-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hi,
I'm trying to add a way to customize "build" and "endbuild" tags inside the parser regexp, so I moved the regexp inside the Parser constructor and converted the regexp literal to a string:
this.regex = new RegExp("(\\n?)([ \\t]*)(<!--\\s*" + config.tagName + ":(\\w+(?:-\\w+)*)\\s*-->)\\n?([\\s\\S]*?)\\n?(<!--\\s*end" + config.tagName + "\\s*-->)\\n?", "ig");
Inside the regexp I just escaped the "\" character and concatenated a custom tagname. For some reason the tests fail because the output is different. Since I'm no expert in RegExp, could you please let me know if the regexp above is correct?
The fork is here: https://github.com/lucassp/gulp-html-replace
Thanks!
Metadata
Metadata
Assignees
Labels
No labels