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

Remove multiline HTML comments #40

Open
indigit opened this issue Oct 11, 2021 · 2 comments
Open

Remove multiline HTML comments #40

indigit opened this issue Oct 11, 2021 · 2 comments

Comments

@indigit
Copy link

indigit commented Oct 11, 2021

I'm trying to strip all HTML comments from the output using this regex: (?=<!--)(?:[\s\S]*?-->)
It works fine for single line comments, however for multiline comments it doesn't. For example this one:

<!-- some text
another text -->

I have tried using this expression: (?=<!--)(?:[\s\S\n\r]*?-->) - didn't work either. Am I missing something?
My directive: subs_filter (?=<!--)(?:[\s\S]*?-->) "" gr;

@tzukav
Copy link

tzukav commented Mar 1, 2022

unfortunately, this module works only per one line

@ffashion
Copy link

this module check content (lit string or regular exp)one line by one line. so your goal doesn't work

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

3 participants