From d577c8c8755b3078da605889488e8988eb31c48d Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Tue, 29 Jan 2019 17:25:32 -0800 Subject: [PATCH] Disable auto `strip-whitespace` on template with legacyOptimizations External copy of cl/225100591 --- lib/mixins/template-stamp.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mixins/template-stamp.js b/lib/mixins/template-stamp.js index aeeb849468..167fbe530a 100644 --- a/lib/mixins/template-stamp.js +++ b/lib/mixins/template-stamp.js @@ -10,7 +10,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN import '../utils/boot.js'; import { dedupingMixin } from '../utils/mixin.js'; -import { legacyOptimizations } from '../utils/settings.js'; const walker = document.createTreeWalker(document, NodeFilter.SHOW_ALL, null, false); @@ -205,7 +204,7 @@ export const TemplateStamp = dedupingMixin( if (!template._templateInfo) { let templateInfo = template._templateInfo = {}; templateInfo.nodeInfoList = []; - templateInfo.stripWhiteSpace = legacyOptimizations || + templateInfo.stripWhiteSpace = (outerTemplateInfo && outerTemplateInfo.stripWhiteSpace) || template.hasAttribute('strip-whitespace'); this._parseTemplateContent(template, templateInfo, {parent: null});