Browse Source

be more lenient about ids

main
Nat Alison 6 years ago
parent
commit
8d218f1076
  1. 2
      scripts/generateHeadingIDs.js

2
scripts/generateHeadingIDs.js

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

Loading…
Cancel
Save