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

gfm: add tagfilter option #64

Merged
merged 1 commit into from
May 31, 2024

Conversation

nobodywasishere
Copy link
Collaborator

When enabled (alongside the gfm option), it will escape certain HTML tags

require "./src/markd"

markdown = <<-MD
# Hello Markd

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

<title>this isn't allowed</title>

<style>
  title {
    font-size: 100px;
  }
</style>
MD

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

Output:

<h1>Hello Markd</h1>
<blockquote>
<p>Yet another markdown parser built for speed, written in Crystal, Compliant to CommonMark specification.</p>
</blockquote>
&lt;title>this isn't allowed&lt;/title>
&lt;style>
  title {
    font-size: 100px;
  }
&lt;/style>

When enabled (alongside gfm), it will escape certain HTML tags
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label May 31, 2024
@icyleaf icyleaf merged commit 7fe5ede into icyleaf:master May 31, 2024
2 of 4 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 31, 2024
@nobodywasishere nobodywasishere deleted the nobody/gfm-tagfilter branch May 31, 2024 13:54
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.

2 participants