mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 04:12:34 +00:00
be more lenient about ids
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user