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
Emoji are rendered within code and code blocks #7332
Comments
Having a way to escape emojis in code as on GitHub (where |
I suppose we can already do that with HTML entities but it's a few more characters to type. 🙂 |
Uh, no. Not within code blocks. Not enough coffee... |
I just posted this issue to goldmark-emoji and was promptly told to come back here :-|
So here I am 😄 Here's my original issue: I have a table full of MAC addresses, some of them containing e.g. e.g.: (with fake data)
I have wrapped all of the data in backticks, but that has no effect on goldmark, but works here on github. I have not found any way to disable the emojification, e.g. I'm using goldmark v1.4.4 via Hugo v0.93.0 |
Either set |
As clever as those solutions might be...
|
@cobber Inserting invisible characters is a particularly poor idea. Sorry about that. Seemed like a good idea at the time... |
The yuin/goldmark-emoji extension did not exist when emoji support was added to Hugo, and that extension seems to handle these cases as desired. We could retain our I do not understand what impact that would have on alternate content formats (HTML, adoc, org, etc.). I'd love to make this somebody else's problem, particularly when the "somebody else" is |
I worked around this particular issue by leaving emoji rendering off by default and adding an emoji shortcode. Content:
Shortcode (
|
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
I looked into the yuin/goldmark-emoji extension:
[markup.goldmark.extensions]
emoji = true But this is overridden if So, if you are only using emoji in markdown, the configuration would be: enableEmoji = false # default is false
[markup.goldmark.extensions]
emoji = true # default is false So, that's quick to do. As a second and optional step, we could (perhaps) replace kyokomi/emoji with yuin/goldmark-emoji in hugo/helpers/emoji. |
Removes emoji code conversion from the page and shortcode parsers. Emoji codes in markdown are now passed to Goldmark, where the goldmark-emoji extension converts them to decimal numeric character references. This disables emoji rendering for the alternate content formats: html, asciidoc, org, pandoc, and rst. Fixes gohugoio#7332 Fixes gohugoio#11587
Removes emoji code conversion from the page and shortcode parsers. Emoji codes in markdown are now passed to Goldmark, where the goldmark-emoji extension converts them to decimal numeric character references. This disables emoji rendering for the alternate content formats: html, asciidoc, org, pandoc, and rst. Fixes #7332 Fixes #11587 Closes #11598
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Problem Description
Emoji strings with code (single backticks) or code blocks (triple backticks) are rendered to images. They should remain as strings.
By comparison, GitHub does not transform emoji strings when they appear in code.
I came across this problem while trying to document the use of emoji strings. Not very important...
The text was updated successfully, but these errors were encountered: