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

Not respecting html comments tags correctly #16

Open
simllll opened this issue Aug 13, 2018 · 2 comments
Open

Not respecting html comments tags correctly #16

simllll opened this issue Aug 13, 2018 · 2 comments

Comments

@simllll
Copy link

simllll commented Aug 13, 2018

E.g.

<!--<div> hallo</div> --> test
<br>cat

Results in:

hallo
--> test 
cat

Should be:

test 
cat

Regards
Simon

@simllll
Copy link
Author

simllll commented Aug 16, 2018

A working regex to remove all html comments would be:
input.replace(/(?=<!--)([\s\S]*?)-->/g, ''); // remove html comment

@stubendek
Copy link
Member

Hi, simllll, thank you for the issue and for the solution, we will update the code soon. Regards, Attila

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