|
@ -31,9 +31,6 @@ function addHeaderID(line, slugger) { |
|
|
if (/\{#[^}]+\}/.test(line)) { |
|
|
if (/\{#[^}]+\}/.test(line)) { |
|
|
return line; |
|
|
return line; |
|
|
} |
|
|
} |
|
|
if (/\[[^\]]+\]/.test(line)) { |
|
|
|
|
|
console.log(line); |
|
|
|
|
|
} |
|
|
|
|
|
const headingText = stripLinks(line.slice(line.indexOf(' ')).trim()); |
|
|
const headingText = stripLinks(line.slice(line.indexOf(' ')).trim()); |
|
|
const headingLevel = line.slice(0, line.indexOf(' ')); |
|
|
const headingLevel = line.slice(0, line.indexOf(' ')); |
|
|
return `${headingLevel} ${headingText} {#${slugger.slug(headingText)}}`; |
|
|
return `${headingLevel} ${headingText} {#${slugger.slug(headingText)}}`; |
|
|