1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fixes that TOC hasn't id attribute when the title is all 2-byte characters (#2994)

* Fix: 2-byte character support of slug

* Fix: Decodes slug to display slug

* Fix: Removed a logic of replaceDiacritics

* Fix: Fixed slugify to pass tests

* Fix: Fixed not to remove underscore

* Adds the test for slugify.js

* Fix: Fix to jump to heading

* Added a comment

* Fix: Created click event only linking to heading

* Fix: Fix to use handleLinkClick(e)

* Fix: Changed the regex rule

* Fix: Changed the regex rule of extractId
This commit is contained in:
roottool
2019-06-29 00:40:16 +09:00
committed by Junyoung Choi
parent 49c75e3599
commit 6736a08240
4 changed files with 78 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ function uniqueSlug (slug, slugs, opts) {
}
function linkify (token) {
token.content = mdlink(token.content, '#' + token.slug)
token.content = mdlink(token.content, `#${decodeURI(token.slug)}`)
return token
}