mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-26 07:25:20 +00:00
try to fix the generator
This commit is contained in:
@@ -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)}}`;
|
||||
|
||||
Reference in New Issue
Block a user