Skip to content

Commit 84c26e6

Browse files
committed
Fix @link tags within lists
Fixes #2103
1 parent 5edf229 commit 84c26e6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Bug Fixes
88

99
- Normalize all file paths on Windows, #2113.
10+
- Fix `@link` tags within lists, #2103.
1011

1112
## v0.23.21 (2022-11-14)
1213

src/lib/output/themes/lib.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ export function displayPartsToMarkdown(
139139
case "@linkplain": {
140140
if (part.target) {
141141
const url = typeof part.target === "string" ? part.target : urlTo(part.target);
142-
const wrap = part.tag === "@linkcode" ? "`" : "";
143-
result.push(url ? `[${wrap}${part.text}${wrap}](${url})` : part.text);
142+
const text = part.tag === "@linkcode" ? `<code>${part.text}</code>` : part.text;
143+
result.push(url ? `<a href="${url}">${text}</a>` : part.text);
144144
} else {
145145
result.push(part.text);
146146
}

0 commit comments

Comments
 (0)