Skip to content

Commit

Permalink
Fix @link tags within lists
Browse files Browse the repository at this point in the history
Fixes #2103
  • Loading branch information
Gerrit0 committed Dec 11, 2022
1 parent 5edf229 commit 84c26e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
### Bug Fixes

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

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

Expand Down
4 changes: 2 additions & 2 deletions src/lib/output/themes/lib.tsx
Expand Up @@ -139,8 +139,8 @@ export function displayPartsToMarkdown(
case "@linkplain": {
if (part.target) {
const url = typeof part.target === "string" ? part.target : urlTo(part.target);
const wrap = part.tag === "@linkcode" ? "`" : "";
result.push(url ? `[${wrap}${part.text}${wrap}](${url})` : part.text);
const text = part.tag === "@linkcode" ? `<code>${part.text}</code>` : part.text;
result.push(url ? `<a href="${url}">${text}</a>` : part.text);
} else {
result.push(part.text);
}
Expand Down

0 comments on commit 84c26e6

Please sign in to comment.