ngx_http_substitutions_filter_module icon indicating copy to clipboard operation
ngx_http_substitutions_filter_module copied to clipboard

Remove multiline HTML comments

Open indigit opened this issue 3 years ago • 2 comments

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;

indigit avatar Oct 11 '21 14:10 indigit

unfortunately, this module works only per one line

tzukav avatar Mar 01 '22 12:03 tzukav

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

ffashion avatar Dec 15 '22 14:12 ffashion