Closed maurymarkowitz closed 3 months ago
Hello there, and thanks for reporting the issue! Which profile are you using? Can you confirm all those characters are "regular" text (those are not markers for some another processing tool)?
If I'm parsing the question correctly, I am using "Generic".
Those characters are regular text. You can see the source here (although I removed the bits in question so I could post a working TOC, so look a previous check-in):
https://github.com/maurymarkowitz/RetroFOCAL/blob/main/doc/RetroFOCAL%20reference%20manual.md
I inserted backslashes by hand and that does fix the problem.
I have a hard time reproducing the issue. May I ask you for some more clarifications?
ONE Taking bot the old and new versions of the problematic anchor, I end up with exactly the same anchor generated:
<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->
- [IF (*exp*) *lineno*{<cr>|;|[,*lineno*][{<cr>|;|,*lineno*]}}](#if-exp-linenolinenolineno)
- [`IF` (*exp*) *lineno*{;|[,*lineno*][{;|,*lineno*]}}](#if-exp-linenolinenolineno-1)
<!-- TOC end -->
<!-- TOC --><a name="if-exp-linenolinenolineno"></a>
### IF (*exp*) *lineno*{<cr>|;|[,*lineno*][{<cr>|;|,*lineno*]}}
<!-- TOC --><a name="if-exp-linenolinenolineno-1"></a>
### `IF` (*exp*) *lineno*{;|[,*lineno*][{;|,*lineno*]}}
We can see the result is the same, as the second anchor has a -1
at the end. Can you provide me with a reproducible example of the issue? Was it really this line that posed problem?
TWO I see you are publishing your markdown on Github, any reason not to use the Github profile? (It may be broken as well, just wondering).
THREE the current version of your markdown seems outdated. Did you rerun bitdowntoc after changing the content? I see lots of diff when copying your current version to bitdowntoc (missing anchors, old titles, etc.) and broken links. Bitdowntoc is idempotent, but needs to be reran every time headers change in your TOC.
Thank you for your help!
@maurymarkowitz any news?
Closing due to inactivity.
Some of my TOC entries have angle brackets, like:
### IF (*exp*) *lineno*{<cr>|;|[,*lineno*][{<cr>|;|,*lineno*]}}
When the TOC generation is run, the resulting anchors are "broken" and do not display properly.
I believe escaping these two characters during parsing would fix the issue.