Skip to content

Add GitHub emoji support#61

Merged
icyleaf merged 2 commits intoicyleaf:masterfrom
nobodywasishere:nobody/gfm-emoji
May 19, 2024
Merged

Add GitHub emoji support#61
icyleaf merged 2 commits intoicyleaf:masterfrom
nobodywasishere:nobody/gfm-emoji

Conversation

@nobodywasishere
Copy link
Collaborator

This pull request adds support for GitHub style emojis (:abc: => 🔤). While emoji support isn't a part of GFM, this is still an important and useful part of markdown parsing that is really useful. It is currently disabled by default (and is enabled / disabled independent of the GFM option).

Example:

require "./src/markd"

markdown = <<-MD
# Hello Markd

`test`

> Yet another markdown parser built for speed, written in `Crystal`, Compliant to CommonMark specification. :confetti_ball: `world`

:abc: :cityscape:
MD

options = Markd::Options.new(emoji: true)
puts Markd.to_html(markdown, options)

Output:

<h1>Hello Markd</h1>
<p><code>test</code></p>
<blockquote>
<p>Yet another markdown parser built for speed, written in <code>Crystal</code>, Compliant to CommonMark specification. 🎊 <code>world</code></p>
</blockquote>
<p>🔤 🏙</p>

This is just the start, I have more GFM support coming soon (strikethrough, bulleted list, etc). Trying to do it in small chunks to make PRs easier.

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label May 18, 2024
Copy link

@robacarp robacarp left a comment

Choose a reason for hiding this comment

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

I think 👍

@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 18, 2024
@icyleaf icyleaf merged commit 8aba327 into icyleaf:master May 19, 2024
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels May 19, 2024
@nobodywasishere nobodywasishere deleted the nobody/gfm-emoji branch May 21, 2024 15:49
@icyleaf icyleaf mentioned this pull request Mar 2, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Merged Pull Request has been merged successfully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants