In this SO answer, I wanted to use the header Script component code in C#
using the section title. However, the markdown syntax removed the hash sign (#
) and it currently displays the text as Script component code in C
. The only option that worked was ending the text with some character other than hash sign (#
) like period (.
).
Things I have tried:
Here are the list of different combinations I have tried based on the escape characters I found on this MSO post. I couldn't make any of these work as I expected it to.
###Script component code in C\#
###Script component code in C`#
###Script component code in C*#
###Script component code in C_#
###Script component code in C{#}
###Script component code in C[#]
###Script component code in C(#)
###Script component code in C##
###Script component code in C+#
###Script component code in C-#
###Script component code in C.#
###Script component code in C!#
###Script component code in C ##
###Script component code in C#.
Results:
Searches on MSO:
https://meta.stackexchange.com/questions/33986/how-do-i-escape-in-code
This question seems to be about escaping hash sign in code and not the section title. I could not find other references when I searched for markdown hash sign
.
Question:
How do I escape the hash sign if I want to use it in the section title?
Reason why I am asking now:
To answer @Cyborgx37's comment:
I rewrote the answer on February 8, 2013 completely with the latest release of the software to keep the answer up to date and also added more details to be more useful.