fix(ShadowCss): fix perf regression (#11420)

fixes #11371
This commit is contained in:
Victor Berchet 2016-09-07 16:48:10 -07:00 committed by Evan Martin
parent 9e2ec7a1aa
commit 78ad9adc1a
1 changed files with 2 additions and 2 deletions

View File

@ -484,11 +484,11 @@ function stripComments(input: string): string {
} }
// all comments except inline source mapping ("/* #sourceMappingURL= ... */") // all comments except inline source mapping ("/* #sourceMappingURL= ... */")
const _sourceMappingUrlRe = /[\s\S]*(\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\/)\s*$/; const _sourceMappingUrlRe = /\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\//;
function extractSourceMappingUrl(input: string): string { function extractSourceMappingUrl(input: string): string {
const matcher = input.match(_sourceMappingUrlRe); const matcher = input.match(_sourceMappingUrlRe);
return matcher ? matcher[1] : ''; return matcher ? matcher[0] : '';
} }
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g; const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;