Some of our devs have mac and some have PC - and there seems to be an issue with usemin when trying to run it - as whitespaces (CRLF and LF) are interchanging and messing it up.
Is there some kind of plugin or regex I can use in my gulpfile to fix them before running usemin?
If you can use regex, you can mention these:
\r
matches a carriage return (ASCII 13) or CR\n
matches a line-feed (newline) character (ASCII 10) or LFSo you can find all CRLF by a simple regex like
/\r\n/g
and LF by/\n/g
and replace them by something like\r\n
.To replace both of those types or also other combinations like CR or LFCR use this regex:
For more (by adding form feed character):
\f
matches a form-feed character (ASCII 12)