mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Update docs/_utils/anchor-headings.js
Co-authored-by: Lea Verou <lea@verou.me>
This commit is contained in:
@@ -53,7 +53,7 @@ export function anchorHeadingsPlugin(options = {}) {
|
||||
if (!id) {
|
||||
const slug = createId(clone.textContent ?? '') ?? uuid().slice(-12);
|
||||
id = slug;
|
||||
let suffix = 0;
|
||||
let suffix = 1;
|
||||
|
||||
// Make sure the slug is unique in the document
|
||||
while (doc.getElementById(id) !== null) {
|
||||
|
||||
Reference in New Issue
Block a user