summaryrefslogtreecommitdiff
path: root/cli/tools
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-10-08 06:55:44 -0700
committerGitHub <noreply@github.com>2024-10-08 06:55:44 -0700
commit94adfeec78ae66d29e186f21e85efee2f179558f (patch)
tree5ca9d51021c0fd1db4648156ad1ebc678843fc7d /cli/tools
parentb2504b7b4d6c17d415d48be2b744aecdcc27a8ff (diff)
fix: use tree-sitter for deno_doc (#26066)
Diffstat (limited to 'cli/tools')
-rw-r--r--cli/tools/doc.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs
index 8f37632c8..5e18546a2 100644
--- a/cli/tools/doc.rs
+++ b/cli/tools/doc.rs
@@ -195,7 +195,7 @@ pub async fn doc(
kind_with_drilldown:
deno_doc::html::DocNodeKindWithDrilldown::Other(node.kind()),
inner: Rc::new(node),
- drilldown_parent_kind: None,
+ drilldown_name: None,
parent: None,
})
.collect::<Vec<_>>(),
@@ -262,7 +262,7 @@ pub async fn doc(
}
struct DocResolver {
- deno_ns: std::collections::HashSet<Vec<String>>,
+ deno_ns: std::collections::HashMap<Vec<String>, Option<Rc<ShortPath>>>,
strip_trailing_html: bool,
}
@@ -286,7 +286,7 @@ impl deno_doc::html::HrefResolver for DocResolver {
}
fn resolve_global_symbol(&self, symbol: &[String]) -> Option<String> {
- if self.deno_ns.contains(symbol) {
+ if self.deno_ns.contains_key(symbol) {
Some(format!(
"https://deno.land/api@v{}?s={}",
env!("CARGO_PKG_VERSION"),
@@ -455,7 +455,7 @@ impl deno_doc::html::HrefResolver for NodeDocResolver {
fn generate_docs_directory(
doc_nodes_by_url: IndexMap<ModuleSpecifier, Vec<doc::DocNode>>,
html_options: &DocHtmlFlag,
- deno_ns: std::collections::HashSet<Vec<String>>,
+ deno_ns: std::collections::HashMap<Vec<String>, Option<Rc<ShortPath>>>,
rewrite_map: Option<IndexMap<ModuleSpecifier, String>>,
) -> Result<(), AnyError> {
let cwd = std::env::current_dir().context("Failed to get CWD")?;
@@ -513,7 +513,6 @@ fn generate_docs_directory(
rewrite_map,
href_resolver,
usage_composer: None,
- composable_output: false,
category_docs,
disable_search: internal_env.is_some(),
symbol_redirect_map,