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

Do not wrap HTML comments in p-tags #2

Closed
exside opened this issue Aug 10, 2018 · 3 comments
Closed

Do not wrap HTML comments in p-tags #2

exside opened this issue Aug 10, 2018 · 3 comments

Comments

@exside
Copy link
Contributor

exside commented Aug 10, 2018

First of all, amazing work you have done here!

Second I though it would probably be better to ignore HTML comments within the markdown text, for example I have an automatic TOC generator that will wrap the generated (nested) list into HTML comments, that will end up like this after parsing:

<p><!-- TOC depthFrom:1 depthTo:4 withLinks:1 updateOnSave:1 orderedList:0 --></p>

not a big deal, but you'll get some extra spacing because of that.

@exside
Copy link
Contributor Author

exside commented Aug 11, 2018

Tried to fix that, but my regex skills are not good enough I guess... I would assume some kind of negative lookahead or negative lookbehind (can we use that outside of node though?) could do that when combined with ((.|\n)+?)(\n\n+|$), but I couldn't figure it out...

@ShynRou
Copy link
Member

ShynRou commented Sep 17, 2018

Thanks.
I will add support for HTML comments, as it seems to me like a valid feature.

@ShynRou
Copy link
Member

ShynRou commented Sep 17, 2018

Thank you for your help!
Just added comment support and published it all.

Install version 1.4.0 for comments, tabs, and html in pre-tags.

@ShynRou ShynRou closed this as completed Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants