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

Options to allow the html tag which disabled by micromark-extension-gfm-tagfilter package #7

Closed
4 tasks done
percy507 opened this issue Feb 27, 2022 · 3 comments
Closed
4 tasks done
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@percy507
Copy link

Initial checklist

Problem

The micromark-extension-gfm-tagfilter package filter the iframe tag which I really need.

Use case: after copying iframe embedded code from youtube, I will paste it in my editor. Before pasting, I will use micromark to handle the plaintext in the clipboard, so I can convert markdown into html string and also keep the raw html string. Then I will convert the html string into html document object and then submit them into the editor to parse it.

Solution

Refactor the excape rules of micromark-extension-gfm-tagfilter package, then offer an option keepTags to prevert filtered them.

// eg
gfmHtml({
  keepTags: 'iframe,style'
})

Alternatives

Offer options to disable micromark-extension-gfm-tagfilter package in micromark-extension-gfm. Then user can write their own tagfilter extension and also use the other gfm packages with import them separately.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Feb 27, 2022
@ChristianMurphy ChristianMurphy added the 🙋 no/question This does not need any changes label Feb 27, 2022
@ChristianMurphy
Copy link
Member

Similar to #6
Micromark GFM is designed to implement GFM.
If you want not-GFM (as you are suggesting here), the individually released plugins can be combined in a way to your liking.

@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Feb 27, 2022
@percy507
Copy link
Author

OK. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants