Skip to content

Commit 2ca4c54

Browse files
committed
fix: safeguard against double-run
1 parent 62faadd commit 2ca4c54

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/anchor-links/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function processHeading(node, compatibilitySlug, links, headings) {
5656
.substring(level + 1)
5757
.replace(/<\/?[^>]*>/g, '') // Strip html
5858
.replace(/\(\(#.*?\)\)/g, '') // Strip anchor link aliases
59+
.replace(/»/g, '') // Safeguard against double-running this plugin
5960
.replace(/\s+/g, ' ') // Collapse whitespace
6061
.trim()
6162

0 commit comments

Comments
 (0)