be more lenient about ids

This commit is contained in:
Nat Alison
2019-02-06 17:34:30 -08:00
parent 3a00259302
commit 8d218f1076

View File

@@ -24,7 +24,7 @@ function addHeaderID(line, slugger) {
return line;
}
// check if it already has an id
if (/\{#[-A-Za-z0-9]+\}/.test(line)) {
if (/\{#[^}]+\}/.test(line)) {
return line;
}
const headingText = line.slice(line.indexOf(' ')).trim();