mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
chore(v2): generic styling improvements
This commit is contained in:
parent
c46a894a01
commit
b33de00a32
16 changed files with 109 additions and 109 deletions
|
@ -59,7 +59,7 @@ module.exports = (string, context = {}) => {
|
|||
}
|
||||
|
||||
if (typeof context.slugStats[slug] === 'number') {
|
||||
// search for an index, that will not clash with an existing headings
|
||||
// Search for an index, that will not clash with an existing headings
|
||||
while (
|
||||
typeof context.slugStats[`${slug}-${++context.slugStats[slug]}`] ===
|
||||
'number'
|
||||
|
@ -67,7 +67,7 @@ module.exports = (string, context = {}) => {
|
|||
slug += `-${context.slugStats[slug]}`;
|
||||
}
|
||||
|
||||
// we are tracking both original anchors and suffixed to avoid future name
|
||||
// We are tracking both original anchors and suffixed to avoid future name
|
||||
// clashing with headings with numbers e.g. `#Foo 1` may clash with the second `#Foo`
|
||||
context.slugStats[slug] = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue