From: Jakub Pawlowicz Date: Fri, 14 Nov 2014 19:51:07 +0000 (+0000) Subject: Speeds up source maps by restoring escaped content only if needed. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=199da0fcfae6ce76e11efccd59f9c08fd28463df;p=clean-css.git Speeds up source maps by restoring escaped content only if needed. --- diff --git a/lib/selectors/source-map-stringifier.js b/lib/selectors/source-map-stringifier.js index ba2c4fb8..894f80b6 100644 --- a/lib/selectors/source-map-stringifier.js +++ b/lib/selectors/source-map-stringifier.js @@ -92,7 +92,9 @@ SourceMapStringifier.prototype.toString = function (tokens) { track(context, token); output.push(token); } else { - var val = self.restoreCallback(token.value); + var val = token.value.indexOf('_') > -1 ? + self.restoreCallback(token.value) : + token.value; track(context, val, token.metadata); output.push(val); }