Skip to content

Commit 18e1aab

Browse files
authored
fix: all symbols summary and example title (#572)
1 parent c4e9bf8 commit 18e1aab

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"test": "deno test -A",
55
"tailwind": "deno run -A build_css.ts",
66
"gen_html": "deno task tailwind && cargo run --example ddoc --features=html -- --name \"std HTTP and Assert\" --html ../deno_std/http/mod.ts ../deno_std/assert/mod.ts ../deno_std/collections/mod.ts --output generated_docs/ --main_entrypoint ../deno_std/assert/mod.ts",
7-
"test:update": "UPDATE=1 cargo test --locked --all-targets && UPDATE=1 cargo test --locked --all-targets --features=tree-sitter && UPDATE=1 cargo test --locked --all-targets --features=syntect"
7+
"test:update": "UPDATE=1 cargo test --locked --all-targets && UPDATE=1 cargo test --locked --all-targets --features=tree-sitter && UPDATE=1 cargo test --locked --all-targets --features=syntect && cargo insta test --review"
88
},
99
"exclude": [
1010
"target",

src/html/jsdoc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ pub(crate) fn render_markdown_summary(
389389
md,
390390
MarkdownToHTMLOptions {
391391
summary: true,
392-
summary_prefer_title: false,
392+
summary_prefer_title: true,
393393
},
394394
)
395395
.unwrap_or_default()
@@ -418,7 +418,7 @@ pub(crate) fn jsdoc_body_to_html(
418418
doc,
419419
MarkdownToHTMLOptions {
420420
summary,
421-
summary_prefer_title: false,
421+
summary_prefer_title: true,
422422
},
423423
)
424424
} else {

tests/snapshots/html_test__html_doc_files_rewrite-16.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ Classes</h2></div><div class="namespaceSection"><div class="namespaceItem" ><div
115115
<div class="namespaceItemContent">
116116
<a href="..&#x2F;.&#x2F;.&#x2F;~&#x2F;Foo.html" title="Foo">Foo</a>
117117

118-
<div><span class="italic">No documentation available</span></div>
118+
<div><div class="markdown_summary"><p>some Foo docs</p>
119+
</div></div>
119120
</div>
120121
</div><div class="namespaceItem" ><div class="docNodeKindIcon"><div class="text-Class bg-Class/15" title="Class">c</div></div>
121122
<div class="namespaceItemContent">

tests/snapshots/html_test__html_doc_files_rewrite.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ expression: "files.get(\"./all_symbols.html\").unwrap()"
7575
<div class="namespaceItemContent">
7676
<a href=".&#x2F;.&#x2F;.&#x2F;~&#x2F;Foo.html" title="Foo">Foo</a>
7777

78-
<div><span class="italic">No documentation available</span></div>
78+
<div><div class="markdown_summary"><p>some Foo docs</p>
79+
</div></div>
7980
</div>
8081
</div><div class="namespaceItem" ><div class="docNodeKindIcon"><div class="text-Class bg-Class/15" title="Class">c</div></div>
8182
<div class="namespaceItemContent">

0 commit comments

Comments
 (0)