Does anybody know how to maintain symbols in markdown internal links?
For example:
[A](#A) works fine
[A and B](#a-and-b) works fine
...whereas:
[A/B](#a-b) does not work
[A-B](#a-b) does not work
Thanks for your help!
Does anybody know how to maintain symbols in markdown internal links?
For example:
[A](#A) works fine
[A and B](#a-and-b) works fine
...whereas:
[A/B](#a-b) does not work
[A-B](#a-b) does not work
Thanks for your help!
I remember running into this problem too.
[A/B](#ab)
should work, instead of using [A/B](#a-b)
.
A /
character is considered a non-character in this case, but when it is not part of a word (ex. Movies / Shows / Videos) then it needs to be treated like an empty word:
[Movies / Shows / Videos](#movies--shows--videos)
I'm not sure how [A-B](#a-b)
isn't working for you, because it should work?
I recommend checking here, every now and then, for additional information being added to the conversation around Github Markdown Heading Anchors: https://gist.github.com/asabaylus/3071099
This is also known as github-slugging or GitHub-style slugging.
After copying and pasting your code into my markdown editor, Mou, I see no issues with either statement. In fact, I copied the link as well, and it keeps the symbols you want. Perhaps this is an issue with your version of markdown or your editor. If you are using a different flavor of markdown, like github, I'd be sure to specify that with tags as that may be your issue. Basic markdown should handle escaping characters though unless it's a bracket. If you want some helpful information, please visit this stack overflow thread: Escaping Brackets
I know this is an old question but since it popped up first in my Google search, maybe it's useful for someone else.
I've been able to handle this by ignoring special characters (and replacing spaces with "-").
Example header: Fruits and vegetables (e.g.: strawberry)
, so the link should be done like this:
[Fruits and vegetables (e.g.: strawberry)](#fruits-and-vegetables-eg-strawberry)
Same applies to slashes:
[And/or something](#andor-something)
© 2022 - 2025 — McMap. All rights reserved.
Does TSS = ESS + RSS Always Hold?
which at your suggestion I found the correct way to escape it is[Does TSS = ESS + RSS Always Hold?](#does-tss--ess--rss-always-hold)
– Graphy