Skip to content

Commit 905414d

Browse files
hoijuiYukaii
andcommitted
Make id block-scoped (thanks @Yukaii)
Co-Authored-By: Yukai Huang <[email protected]> Signed-off-by: hoijui <[email protected]>
1 parent 34c2bfc commit 905414d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/js/extra.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ const linkifyAnchors = (level, containingElement) => {
867867
if (header.getElementsByClassName('anchor').length === 0) {
868868
if (typeof header.id === 'undefined' || header.id === '') {
869869
// to escape characters not allow in css and humanize
870-
var id = slugifyWithUTF8(getHeaderContent(header))
870+
let id = slugifyWithUTF8(getHeaderContent(header))
871871
// to make compatible with GitHub, GitLab, Pandoc and many more
872872
if (window.linkifyHeaderStyle !== 'keep-case') {
873873
id = id.toLowerCase()

0 commit comments

Comments
 (0)