How to escape the (hash) # sign in a Github markdown header? (backslash is not working)
GithubMarkdownGithub Problem Overview
I have the following code on a README.md
file on Github, where I am trying to display the hash sign on a header (I am trying to escape it using the \
symbol) like so:
### C\#
* [Beginning Game Programming with C#](https://www.coursera.org/course/gameprogramming)
However it renders like so:
I obviously want the hash sign to appear on the header, and I also tried to use a double backslash, but it didn't work. How do I get the pound sign to appear?
EDIT: the linked question deals with github links, my question is to do with headers on a .md
file.
Github Solutions
Solution 1 - Github
You could try and add a matching '#', followed by one extra '#':
### C# #
Solution 2 - Github
You can also use #
in place of the # symbol (based on this meta answer).
Or, as in this answer you can insert an invisible character before the octothorp, such as ​
.
Solution 3 - Github
Add an extra space after ### C\#
. See the demo.