Closed davidmaxwaterman closed 9 years ago
Those slashes are safe to remove because they're in strings, not RegExp literals. In a string you can backslash-escape any ascii character and it will give that character. E.g.
'\/'.length === 1
'/' === '\/'
'<\/?[^<>]+?\/?>' === '</?[^<>]+?/?>' // true!
Polyup makes a complete mess of comments, but they're still comments and so are quite inert.
However, I consider the following change to be more worrisome - it seems that polyup has removed backslashes from regular expressions, which surely completely changes their effect :
Any thoughts on this? Perhaps there is some validity to removing them that I'm not seeing...