I have a README.md
markdown file that I use to describe a project that is hosted on GitHub. Within this file I have several headlines and sub-headlines, each starting with one or more hashes, as usual in markdown.
Now I want to set the text of one headline to C#
, but GitHub does not respect the hash a part of the text, but interprets it as an (optional) closing hash for the headline.
Even if I escape the hash by prefixing it with a backslash, it does not work. So if I type
## C#
I get:
C
If I use
## C\#
I get:
C\
How do I write this head-line in a correct way?
You could use a true sharp sign, ♯
, instead of the hash sign, #
. From the Wikipedia page on C♯:
By convention, a hash sign is used for the second character in normal text; in artistic representations, sometimes a true sharp sign is used: C♯.
Here ## C♯
produces
Alternatively, (at least on this site) just put a space after the last #
, for example ## C\#
produces
Note that Pandoc seems to handle # C\#
correctly (try it).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With