Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support emojis in Markdown #565

Open
updiversity opened this issue May 11, 2022 · 13 comments
Open

Support emojis in Markdown #565

updiversity opened this issue May 11, 2022 · 13 comments
Labels
enhancement New feature or request

Comments

@updiversity
Copy link

Context

I tried to use emoji in Markdown, like referred here

https://tutorialmarkdown.com/emojis

But when exported to html or confluence, it does not work.

It does just reproduce the text, like this one - 😂

Proposal

it would be great if we could include them.

Tasks and updates

No response

@updiversity updiversity added the enhancement New feature or request label May 11, 2022
@welcome
Copy link

welcome bot commented May 11, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@epogrebnyak
Copy link

epogrebnyak commented Aug 26, 2022

I was looking for similar feature, but then realised an emoji is just a unicode character that you can add directrly to your source, without a shortcode:

You have to copy a character from somewhere, this can be a link above or https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md

@adam-grant-hendry
Copy link

adam-grant-hendry commented Oct 18, 2022

I think it would be nicer to add support for the short codes. It's easier to know what's being displayed that way when reading the raw markdown, especially when reviewing the docs.

e.g.

Emoji Short Code Unicode
🎉 :tada: \u{1F389}

I know what ":tada:" is. I don't know what "\u{1F389}" is.

@adam-grant-hendry
Copy link

If support for adding 3rd-party/custom MarkdownIt plugins through conf.py were supported, the mdit-py-emoji plugin could be used.

@chrisjsewell
Copy link
Member

Heya, is there a reason that you cannot just type emojis directly into the text? I have done this plenty in https://myst-parser.readthedocs.io/en/latest/ without issue

@matrach
Copy link

matrach commented Jun 13, 2023

On of the use cases is to include in the docs a generated CHANGELOG.md file (e.g., by python-semantic-release) of a project using the shortcode format of gitmoji in commit messages.

@chrisjsewell
Copy link
Member

using the shortcode format of gitmoji in commit messages.

but again, this page has a section on "Shortcode vs Unicode", and there is a lot more cons for using the shortcode 😅, plus unicode is supported on essentially every platform now

I know what ":tada:" is. I don't know what "\u{1F389}" is.

@adam-grant-hendry you don't need to use either of these, just directly use 🎉

It seems to me that shortcodes are a legacy syntax, from before unicode became a modern standard

@matrach
Copy link

matrach commented Jun 13, 2023

It seems to me that shortcodes are a legacy syntax, from before unicode became a modern standard

Well, there are still people working on a 🥔 that doesn't do emoji substitution in fonts 😆.
For instance, my Tilix (based on gnome-terminal, with somewhat old Ubuntu Mono) does not yet understand that 👨[zero-with-joiner]💻 is 👨‍💻. Neither does IntelliJ (PyCharm) configured with Source Code Pro.
xterms doesn't have any substitution at all and renders 👨‍💻 as .

@adam-grant-hendry
Copy link

Heya, is there a reason that you cannot just type emojis directly into the text? I have done this plenty in https://myst-parser.readthedocs.io/en/latest/ without issue

Typing in the emojis directly works for me 👍

@chrisjsewell
Copy link
Member

chrisjsewell commented Jul 11, 2023

FYI, essentially the pathway to allowing this in myst-parser, would be to create a plugin in https://github.com/executablebooks/mdit-py-plugins, to essentially port https://github.com/markdown-it/markdown-it-emoji.
PRs welcome

Then we can add it in the list of enable_extensions

@dbitouze
Copy link

dbitouze commented Nov 13, 2023

Heya, is there a reason that you cannot just type emojis directly into the text? I have done this plenty in https://myst-parser.readthedocs.io/en/latest/ without issue

One reason is that it can be tedious to have to open a web page/software/something where you know that such an emoji can be copied and pasted. For example, I opened Signal and typed :wink: to get, copy and paste 😉. Simply typing :wink: would be much more convenient.

@matrach
Copy link

matrach commented Dec 22, 2023

For example, I opened Signal and typed :wink: to get, copy and paste 😉. Simply typing :wink: would be much more convenient.

FYI modern OSes have a direct way to input/search for Emoji.
The quirk is, you may have to search with the Unicode name, not the short codes, which are non-standard. For instance:

  • Gnome (with default settings): tap Meta (aka 🪟 Windows key) and type the Unicode character name. Hitting Enter will copy it to the clipboard.
  • On Windows, press Windows + . (dot) for direct input.
  • On Mac, use Ctrl+Cmd+Space or Fn+E.

This why I consider this feature to be more about supporting legacy hardware / software of the documentation's reader rather than usability of the writer 😉.

@dbitouze
Copy link

The quirk is, you may have to search with the Unicode name, not the short codes, which are non-standard.

Short codes, though non-standard, are easier to remember. E.g. :wink: vs U+1F609.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants