With the TOC plugin enabled, when some characters are present in the title section, the generated link in the TOC is not working.
Joplin version: 1.0.170
Platform: Windows
OS specifcs: Windows 10, portable version
: @ \I also attached a sample Markdown document with some examples (the Not working entries)
In the generated TOC, I聽 expect when I click on a link in the TOC to be brought to the relevant section of the note.
I started the application with the debug window as suggested, but there simply nothing appearing in said window
I don't think we can fix this on our side. @tessus do you have some idea? Maybe the titles need to be escaped at the plugin level?
I'm not sure, what about the slugify function? Is this an issue that is at the source or does this only manifest in Joplin? I will have to test this.
Is this somehow different to #1953?
Hmm, I just tested with git master that includes the fix from https://github.com/nagaozen/markdown-it-toc-done-right/issues/22 and special characters are still not working.
So either the plugin was fixed but for some reason it does not work in Joplin, or the plugin was not fixed. Maybe I have some time this weekend to investigate.
Does the test file/cases in the #1953 work with the git master that has the (supposed) fix? The following chars were in the those tests: ? ! # & % ( )
regards Helmut K. C. Tessarek
(sent from a mobile device)
How does the HTML look on the web inspector? I guess there's some small difference between the way the links are slugified and the heading anchors.
Hmm, maybe it would be wise to check (if not already) that the fix for #1843 is working?
I think I figured it out. We have to add the slugify function to the options for the toc module as well (not only for the anchor module).
I will run some more tests tomorrow.
@laurent22 If all is good, I'll open a PR, or shall I push the fix directly (w/o a PR)?
didn't let me sleep. here you go: #2052
fixed in 83c3c027d0596f36ece710a0b69d2910da1e7e42