If I type #1
when creating an Issue in Github, it will reference to Issue ID 1
. Is there a way to avoid this by escaping the #
sign? I just need it to be regular text.
You can tell GitHub to ignore (or escape) Markdown formatting by using \ before the Markdown character.
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 ​ . Save this answer.
choose from this list:
#⁠1
⯇ #
— <invisible character> — 1
<span>#</span>1
<i>#</i>1
⯇ the number sign will be italic
\# 1
#1
⯇ you need to copy-paste this!
#
— <invisible character> — 1
even works for commit messages.
These are the options you have:
[0-9]+
) UTF-8 character between #
and the number # 1
) — this will even work in commit messages # 1
) — useful for characters not on your keyboard #
or the number #*1*
)#<i>1</i>
)You can put any kind of space character between #
and the number.
U+2060
This is the most unobtrusive solution:
#⁠1
⇒ #1In this case the space character is written as ⁠
, that's the numeric character reference for the WORD JOINER
unicode character [3].
The word joiner (WJ) is a zero width non-breaking space; that is, it's not visible (zero width) [4] and prevents #
and the number from being separated by an automatic line break (non-breaking) [5].
U+0020
/ no-break space — U+00A0
Of course you can use a "normal" space, which is faster to type than ⁠
:
\# 1
⇒ # 1The backslash before the hash sign (\#
) prevents the line from becoming a heading in case \# 1
is at the beginning of the line.
The \# 1
solution uses a breaking space. To use a non-breaking space, type instead: # 1
(no backslash needed).
If you're using an ”advanced“ keyboard layout such as Colemak or Neo (german), you can use it to type special spaces — non-breaking spaces (NBSP) and narrow non-breaking spaces (NNBSP).
\# 1
⇒ # 1 (NBSP)\# 1
⇒ # 1 (NNBSP)Besides the solution of putting an extra character between #
and the number, you can use markdown or HTML formatting. Below I'm providing some examples. Some solutions are striked out because they do not work (anymore).
Please note that the functionality could change at any time in case GitHub changes its code.
<span>
(as stated by Sam Harwell) <span>#</span>1
⇒ #1*#*1
⇒ #1<i>#</i>1
⇒ #1#*1*
⇒ #1 #<i>1</i>
⇒ #1 **#**1
⇒ #1<b>#</b>1
⇒ #1#**1**
⇒ #1 #<b>1</b>
⇒ #1 `#1`
⇒ #1
`#`1
⇒ #
1#`1`
⇒ #1
You can use the following:
<span>#</span>1
I was quite surprised that the following did not work:
#1
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