Skip to content

Commit 901ee97

Browse files
committed
try again
1 parent dc1e536 commit 901ee97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/generateHeadingIDs.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ function addHeaderID(line, slugger) {
3131
if (/\{#[^}]+\}/.test(line)) {
3232
return line;
3333
}
34-
const headingText = stripLinks(line.slice(line.indexOf(' ')).trim());
34+
const headingText = line.slice(line.indexOf(' ')).trim();
3535
const headingLevel = line.slice(0, line.indexOf(' '));
36-
return `${headingLevel} ${headingText} {#${slugger.slug(headingText)}}`;
36+
return `${headingLevel} ${headingText} {#${slugger.slug(
37+
stripLinks(headingText),
38+
)}}`;
3739
}
3840

3941
function addHeaderIDs(lines) {

0 commit comments

Comments
 (0)