Skip to content

Commit

Permalink
bugfix: when escaping # or :, make sure to remove the escape from wik…
Browse files Browse the repository at this point in the history
…ilink name
  • Loading branch information
carbontwelve committed May 8, 2024
1 parent 5c8f04c commit 5000a77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wikilink-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ module.exports = class WikilinkParser {
if (nameParts[0].at(-1) !== '/') {
name = nameParts[0];
anchor = nameParts[1];
} else {
name = name.replace('/#', '#');
}
}

Expand Down Expand Up @@ -96,6 +98,8 @@ module.exports = class WikilinkParser {
if (parts[0].at(-1) !== '/') {
fnName = parts[0];
name = parts[1];
} else {
name = name.replace('/:', ':');
}
}

Expand Down

0 comments on commit 5000a77

Please sign in to comment.