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

Add GitHub emoji support #61

Merged
merged 2 commits into from
May 19, 2024
Merged

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
1 of 4 checks passed
@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
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