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

Aggressive emoji support with twemoji #19

Merged
merged 11 commits into from
Aug 19, 2018
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Aug 19, 2018

This PR will add an aggressive emoji support with twemoji.

@marp-team/marpit has removed unicode emoji support on v0.0.12 because of issues in stable Chrome (Refer to marp-team/marpit#53).

However, marp-core should not mutate an exported result by environment's emoji fonts because of supporting on multi-platform including Web. (e.g. Server-side PDF rendering)

So we implement the aggressive Emoji conversion by using twemoji. It can convert emoji shortcodes and any Unicode emoji to twemoji. Especially Unicode will convert even if it was included in <code> elements. (Ported from previous Marpit implementation)

Unlike Marpit's previous printable emoji support, the rendered emoji by twemoji is always colored and would never vanish.

Aggressive conversion of unicode emoji

# Shortcode :arrow_right: :+1::cat::hamburger:

# Unicode ➡️ 😃⚽🔥

---

# <!--fit--> 👪 /w fitting
Disabled Enabled
not-colored twemoji

Options

Some people might disappoint not to be able to use Unicode emoji. Thus we add emoji option in Marp constructor. You can customize option if you are using marp-core directly.

We might stop the conversion of Unicode emoji when the stable colored emoji rendering was supported on Chrome in future.

@yhatt yhatt merged commit 7c08214 into master Aug 19, 2018
@yhatt yhatt deleted the emoji-support-with-twemoji branch August 19, 2018 15:39
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.

1 participant