Broken link and wrong text in some ToC entries #2456
Labels
scope.publish
Static site generation, sending note links and anything to do with publishing your notes.
status.info-needed
More information is needed from filer for issue to be actionable
type.bug
Something isn't working
Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)
Describe the bug
I noticed that we have a heading in the Dendron FAQ with the text "What can I do with the root note?", where "root" is inline code. This renders correctly on the page, but the entry in the table of contents reads "What can I do with the note?" (text content within inline code is missing).
In addition, the ToC link is broken, I assume that different logic is used to generate the
href
attribute of thea
element in the ToC than what is used to generate theid
attribute of theh1
element in the main content.This made me test some other weird/special cases, and while I was unable to generate broken links in other ways, I discovered that the characters "-" and "_" are not rendered in ToC entries either - see table below.
To Reproduce
Steps to reproduce the behavior:
# Test1 `inlinecode` End
<h1 id="test1-inlinecode-end">Test1 <code>inlinecode</code> End</h1>
<a href="#test1--end">Test1 End</a>
<a href="#test1-inlinecode-end">Test1 inlinecode End</a>
# Test2 - (hyphen) End
<h1 id="test2---hyphen-end">Test2 - (hyphen) End</h1>
<a href="#test2---hyphen-end">Test2 (hyphen) End</a>
<a href="#test2---hyphen-end">Test2 - (hyphen) End</a>
# Test3 _ (underscore) End
<h1 id="test3-_-underscore-end">Test3 _ (underscore) End</h1>
<a href="#test3-_-underscore-end">Test3 (underscore) End</a>
<a href="#test3-_-underscore-end">Test3 _ (underscore) End</a>
Expected behavior
See the expected result for each test case in the right-most column "Expected result" of the table above.
Screenshots
Desktop (please complete the following information)
The text was updated successfully, but these errors were encountered: