We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a99265 commit da101acCopy full SHA for da101ac
index.js
@@ -592,6 +592,23 @@ exports.astNodeVisitor = {
592
);
593
replace(typeRegex);
594
595
+ const linkWithoutTextRegex = new RegExp(
596
+ `@(link (?!https?))${key}(\\.[^\\s\\}]*)*(\\s*\\})`,
597
+ 'g',
598
+ );
599
+ const linkWithTextRegex = new RegExp(
600
+ `@(link (?!https?))${key}((?:\\.[^\\s\\}]*)*(?:\\s|\\s*\\|)[^\\}]*\\})`,
601
602
603
+
604
+ // If link is without text, use key as text
605
+ comment.value = comment.value.replace(
606
+ linkWithoutTextRegex,
607
+ `@$1${key} ${key}$2$3`,
608
609
610
+ replace(linkWithTextRegex);
611
612
function replace(regex) {
613
if (regex.test(comment.value)) {
614
const identifier = identifiers[key];
0 commit comments