Closed DavidAnson closed 1 year ago
It is separate from GFM, but there is an existing plugin for it https://github.com/remarkjs/remark-gemoji
Neat! That's seemingly a remark plugin - will it work as-is with micromark (which I'm using directly)?
It is a remark plugin, there is not a micromark equivalent currently.
Hi!
micromark deals with the markdown syntax. Tables are syntax for example. GH does not handle gemoji as syntax.
You can see that for example because escapes and character references don’t “work”.
:+1:
\:\-1:
:+1: \:-1:
Or you can see how it works inside HTML:
<p>:+1:</p>
:+1:
Doing gemoji requires knowledge of an HTML tree structure. We can’t do this work in micromark, it doesn’t have that.
We already have entire ecosystems for AST transforms: mdast/hast at the tree level, or remark/rehype/unified a little bit higher.
Closing as we can’t, and I believe shouldn’t, perform this here.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Initial checklist
Problem
While "EMOJICODE" is not covered by the GFM specification, it is specifically mentioned in their documentation: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emoji.
Might it be reasonable to assume the the
micromark
GFM extension would include support for this syntax? Today, it seems the:emoji:
is rendered to HTML as-is.Solution
Convert
:tada:
to :tada:.Alternatives
If a little competitive spirit is helpful, note that the
markdown-it
library has a plugin to do this: https://github.com/markdown-it/markdown-it-emoji.