try to fix the generator

This commit is contained in:
Nat Alison
2019-02-06 17:58:14 -08:00
parent 727fc3d271
commit 49e5ca68fe

View File

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