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

Does the class support regular expression filtering #112

Closed
zhangyul opened this issue Aug 4, 2020 · 2 comments
Closed

Does the class support regular expression filtering #112

zhangyul opened this issue Aug 4, 2020 · 2 comments

Comments

@zhangyul
Copy link

zhangyul commented Aug 4, 2020

md.use(markdownItAttrs, {
    allowedAttributes: [/^\.markdown-.*$/] // empty array = all attributes are allowed
 });

Example input:

test{.red .markdown-red}

Current output:

<p>test</p>

Expected output:

<p class="markdown-red">test</p>
@arve0
Copy link
Owner

arve0 commented Sep 13, 2020

Does the class support regular expression filtering

No not currently. allowedAttributes only scans attribute keys, not values of attributes.

@arve0
Copy link
Owner

arve0 commented Dec 30, 2021

Hi 🙂 I'll close this issue as out of scope, as I do not have time to implement it. Of anyone wants to implement, feel free to reopen.

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

No branches or pull requests

2 participants