Skip to content

Commit e08dfe8

Browse files
committed
fix: do not double wrap GitHub user links in changelog
1 parent 5163b71 commit e08dfe8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apify-docs-theme/src/markdown.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ const linkifyUserTags = () => (tree) => {
4646
const userTagRegex = /@([a-zA-Z0-9-]+)(\s|$)/g;
4747
const match = userTagRegex.exec(node.value);
4848

49-
if (!match) return;
50-
5149
const directParent = parents[parents.length - 1];
50+
51+
if (!match || directParent.type === 'link') return;
52+
5253
const nodeIndexInParent = directParent.children.findIndex((x) => x === node);
5354

5455
const username = match[1];

0 commit comments

Comments
 (0)