From: sqrt Date: Mon, 2 Jun 2014 23:38:59 +0000 (+0200) Subject: fix #178 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1127285c5213c56dd622126a8458ca14323b30e0;p=html-minifier.git fix #178 --- diff --git a/src/htmlminifier.js b/src/htmlminifier.js index cf419c5..97fa0a9 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -37,7 +37,7 @@ } function collapseWhitespace(str) { - return str ? str.replace(/\s+/g, ' ') : str; + return str ? str.replace(/[\t\n\r ]+/g, ' ') : str; } function collapseWhitespaceSmart(str, prevTag, nextTag, options) {