Emoji within quotation marks not displaying correctly in topic excerpt

AI-generated summary

The discussion revolves around the display of emojis within quotation marks in topic excerpts on the /latest page or category page. Jonathan5 initially noted that emojis are displayed incorrectly when placed directly next to quotation marks. dax explained that adding a space before the emoji solves the issue and is the correct syntax.

Jonathan5 asked where this syntax is documented, and dax provided a link to the relevant GitHub pull request. Jonathan5 then inquired about a user’s guide for Discourse’s markup, including how to put emojis in quotation marks.

Despite using the correct syntax, Jonathan5 found that the space between the quotation marks and the emoji was still displayed, and the quotation marks did not convert to “smart quotes.” dax suggested checking the site setting markdown typographer quotation marks and stated that there is no way to hide the space character. Jonathan5 will use curly quotation marks by copying and pasting them.

For pinned posts where a topic excerpt is displayed — on the /latest page or the relevant category page — the emoji is displayed as, for example:

  • ":smile:" rather than “:smile:”
  • ':smile:' rather than ‘:smile:’
  • ":smile: some text" rather than “:smile: some text”.

The following are fine:

  • “some text :smile: some text”
  • “some text :smile:”

This isn’t a huge problem but I wonder whether it’s something that could be changed or worked around.

The correct syntax for emojis to work properly is that there is at least one blank space before the emoji, so all emojis will be shown correctly on the excerpt as well using the correct syntax:

  • " :smile: "
  • ' :smile: '
  • " :smile:
  • ' :smile:

This is not a bug, moving to Contribute > UX.

6 Likes

That’s great, thanks. Where is this sort of thing documented?

https://github.com/discourse/discourse/pull/8453

4 Likes

Is there a user’s guide about Discourse’s markup (eg including how to put emojis in quotation marks)?

I’ve tried this — the quotation marks don’t convert turn into “smart quotes” and the space between the " and the emoji is displayed. Is there a good way of not displaying the space character? Thank you.

See the site setting markdown typographer quotation marks

I don’t think there is a way to hide the space :thinking:

2 Likes

Thanks for this. Normally the curly quotation marks do appear. I’ll just cut and paste them in this case.