Skip to content

Commit

Permalink
Re-enable '_' in links
Browse files Browse the repository at this point in the history
  • Loading branch information
Moonbase59 committed Apr 2, 2024
1 parent ac3b6a3 commit 8e0dec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gh-toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function tocIt(inputMD, minHeading, maxHeading, ignoreLinex)

headingLevel -= minHeading;

var headingAnchor = headingTitle.toLowerCase().replace(/[^_0-9a-z\xE0-\xFF- ]/g, "").replace(/_(?=.*)/g, "").replace(/\*(?=.*)/g, "").replace(/ /g, "-");
var headingAnchor = headingTitle.toLowerCase().replace(/[^_\d\w-\s]/g, "").replace(/\*(?=.*)/g, "").replace(/ /g, "-");

if(headingAnchor in anchorTracker)
{
Expand Down

0 comments on commit 8e0dec0

Please sign in to comment.