Ron Dunn
Ron Dunn

Reputation: 3078

How can I stop GitHub from rendering emojis in Markdown?

I'm trying to write "H:m:s" in some documentation, but GitHub keeps changing it to "HⓂ️s", since :m: is the code of the Ⓜ️ emoji.

How can I stop this behaviour?

Upvotes: 8

Views: 4280

Answers (1)

glyvox
glyvox

Reputation: 58069

There are two ways to disable the rendering of an emoji:

  1. Use inline code with either ` or <code>, or use 4 spaces before the line to make the whole line monospaced.
  2. Insert a zero-width space after the first colon, like this:

    h:<zero-width space>m:s
    

You can copy a zero-width space from this Wikipedia article.

PS: for text (non-source context) you use the numeric entity representation, &#8203;
(the example results in "h:​m:s").

Upvotes: 14

Related Questions