svg-inline-loader icon indicating copy to clipboard operation
svg-inline-loader copied to clipboard

Fix regexp not removing multi-line comments

Open thiemowmde opened this issue 6 years ago • 1 comments
trafficstars

The previous regular expression had two issues:

  1. It was only able to remove 1-line comments.
  2. It was not set to be ungreedy, and could potentially remove content between two comments. E.g. when something like <!-- comment --> content <!-- comment --> does not contain a newline character, the content would actually be removed.

We run into this issue at https://gerrit.wikimedia.org/r/489323. As a temporary workaround we made all our comments 1-line comments, and made sure each comment is on a separate line.

thiemowmde avatar Feb 12 '19 13:02 thiemowmde

CLA assistant check
All committers have signed the CLA.

jsf-clabot avatar Feb 12 '19 13:02 jsf-clabot