What would the JavaScript regex be to minify contents of HTML. Note that I only want to remove spaces that are >2 and nothing below.
I also want to replace single quotation marks ' '
with double " "
This is what I got so far, although I'm guessing there's a more efficient way of doing this:
var findSpaces = content.match(' ') >= 2;
var findQuotes = content.match(" ' ");
content.replace(findSpaces, "" );
content.replace(findQuotes, ' " ' );
No jQuery please