[ci] format
This commit is contained in:
parent
ba11b33996
commit
91e4ba03da
1 changed files with 5 additions and 5 deletions
|
@ -53,11 +53,11 @@ export default function createCollectHeaders() {
|
||||||
node as any
|
node as any
|
||||||
).value = `<${node.tagName} id={${node.properties.id}}>${raw}</${node.tagName}>`;
|
).value = `<${node.tagName} id={${node.properties.id}}>${raw}</${node.tagName}>`;
|
||||||
} else {
|
} else {
|
||||||
let slug = slugger.slug(text);
|
let slug = slugger.slug(text);
|
||||||
|
|
||||||
if (slug.endsWith('-')) slug = slug.slice(0, -1);
|
if (slug.endsWith('-')) slug = slug.slice(0, -1);
|
||||||
|
|
||||||
node.properties.id = slug;
|
node.properties.id = slug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue