From: Almir Filho Date: Thu, 19 Dec 2013 13:52:05 +0000 (-0200) Subject: Adds missing HTML inline tags for collapsing whitespace X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=282e0e22f23b08eef2f8cd7a8c293524f6400146;p=html-minifier.git Adds missing HTML inline tags for collapsing whitespace --- diff --git a/src/htmlminifier.js b/src/htmlminifier.js index 18fb4ed..168ac2f 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', 'abbr', 'acronym', 'b', 'big', 'button', 'code', 'del', 'dfn', 'em', 'font', 'i', 'ins', 'kbd', 'mark', 'q', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u', 'var']; + var tags = ['a', 'abbr', 'acronym', 'b', 'bdi', 'bdo', 'big', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i', 'ins', 'kbd', 'mark', 'q', 'rt', 'rp', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u', 'var']; if (prevTag && prevTag !== 'img' && (prevTag.substr(0,1) !== '/' || ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {