Skip to content

Emoji parsing in Readme content - #1816

Merged
vilmibm merged 2 commits into
cli:trunkfrom
ojaswadhwani:parseEmoji
Sep 21, 2020
Merged

vilmibm merged 2 commits into
cli:trunkfrom
ojaswadhwani:parseEmoji

Conversation

@ojaswadhwani

@ojaswadhwani ojaswadhwani commented Sep 18, 2020 •

Copy link
Copy Markdown
Contributor

Closes #1771

Installed emoji, an emoji library in go which has additional emoji aliases from gemoji (used by github) and extra features. It fixes the bug of emoji parsing in displaying readme content.

emojiParsing

@vilmibm vilmibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may eventually want a proper --raw mode for these files but I'm ok with this for now 👍

@vilmibm
vilmibm merged commit e3f21a5 into cli:trunk Sep 21, 2020
@mislav

mislav commented Sep 23, 2020 •

Copy link
Copy Markdown
Contributor

Note that this approach will erroneously replace :{emoji}: in contexts that it shouldn't be replaced: inside <code> spans, in <pre> blocks, and in HTML attributes such as links. So this fixes one rendering bug, but introduces others.

To ensure we only replace :{emoji}: in the same places GitHub web does, we would have to build this into a Glamour renderer.

@yonycalsin

Copy link
Copy Markdown

this is great !

@luckman212

Copy link
Copy Markdown

@mislav , @vilmibm I noticed this renderer bug today too. Since this PR is merged already is it worth creating an new issue for fixing the renderer? I understand this is probably low priority 🙂

from gh repo view strongswan/strongswan:

image

from strongswan/README.md:

image

@samcoe

samcoe commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

@luckman212 I think it would be best to open a new issue, for ease of tracking, and just reference this one in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emojis (like this: :emoji_name:) don't display properly in gh repo view

6 participants