From: Alex Sanders Date: Thu, 13 Jun 2013 12:35:49 +0000 (+0200) Subject: add code, kbd and quote to tags with space around them X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=6e5005ef7ed7c3dd9baf6ecc39c3ec1b2470b068;p=html-minifier.git add code, kbd and quote to tags with space around them these tags get cinched up currently, e.g.

here's somecode

and

I saidyes!and left.

--- diff --git a/src/htmlminifier.js b/src/htmlminifier.js index eafb599..4df4c22 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -42,7 +42,7 @@ function collapseWhitespaceSmart(str, prevTag, nextTag) { // array of tags that will maintain a single space outside of them - var tags = ['a', 'b', 'big', 'button', 'em', 'font','i', 'img', 'mark', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u']; + var tags = ['a', 'b', 'big', 'button', 'code', 'em', 'font','i', 'img', 'kbd', 'mark', 'q', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u']; if (prevTag && (prevTag.substr(0,1) !== '/' || ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {