Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
tesseralis committed Feb 7, 2019
1 parent dc1e536 commit 901ee97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/generateHeadingIDs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ function addHeaderID(line, slugger) {
if (/\{#[^}]+\}/.test(line)) {
return line;
}
const headingText = stripLinks(line.slice(line.indexOf(' ')).trim());
const headingText = line.slice(line.indexOf(' ')).trim();
const headingLevel = line.slice(0, line.indexOf(' '));
return `${headingLevel} ${headingText} {#${slugger.slug(headingText)}}`;
return `${headingLevel} ${headingText} {#${slugger.slug(
stripLinks(headingText),
)}}`;
}

function addHeaderIDs(lines) {
Expand Down

0 comments on commit 901ee97

Please sign in to comment.