Skip to content

Commit 909b757

Browse files
committed
fix markdown
1 parent 9ba3277 commit 909b757

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/html/jsdoc.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ fn parse_links<'a>(md: &'a str, ctx: &RenderContext) -> Cow<'a, str> {
4949

5050
(title, href)
5151
} else {
52+
let title = if title.is_empty() { link } else { title };
53+
5254
(title, link.to_string())
5355
};
5456

@@ -565,7 +567,10 @@ impl ModuleDocCtx {
565567
{
566568
let deprecated = node.js_doc.tags.iter().find_map(|tag| {
567569
if let JsDocTag::Deprecated { doc } = tag {
568-
Some(doc.to_owned().unwrap_or_default())
570+
Some(render_markdown(
571+
render_ctx,
572+
doc.as_deref().unwrap_or_default(),
573+
))
569574
} else {
570575
None
571576
}

src/html/symbols/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl FunctionCtx {
8080
Some(
8181
doc
8282
.as_ref()
83-
.map(|doc| crate::html::jsdoc::render_markdown_summary(ctx, doc))
83+
.map(|doc| crate::html::jsdoc::render_markdown(ctx, doc))
8484
.unwrap_or_default(),
8585
)
8686
} else {

src/html/symbols/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ impl SymbolGroupCtx {
105105
Some(
106106
doc
107107
.as_ref()
108-
.map(|doc| {
109-
crate::html::jsdoc::render_markdown_summary(ctx, doc)
110-
})
108+
.map(|doc| crate::html::jsdoc::render_markdown(ctx, doc))
111109
.unwrap_or_default(),
112110
)
113111
} else {

0 commit comments

Comments
 (0)