-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some minor parsing issues for GitHub markdown #92
Comments
For the |
The The The fix is almost identical to thlorenz/anchor-markdown-header#29. |
For the #header-&-noise case, the result should be a single dash: #header-noise. Tested on github and gitlab - the link generated ignored the ampersand entirely, and uses a single hyphen. |
I would guess that it converts all special chars to |
When parsing: a header named
this
identifier(Note the
code
formating) doctoc yields:#this-identifier
... when it should yield:
#-this-identifier
This is because,
-this-identifier
, rather thanthis-identifier
, is the actual id that GitHub renders when it converts the markdown to HTML for display. As a result the generated doctoc link will not work as a relative link.There are a few other examples of this like:
For
Header & noise
doctoc produces
#header-&-noise
which will lead to a dead link in GitHub markdown rather than the appropriate
#header-noise
The text was updated successfully, but these errors were encountered: