File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11import { makePlaceholder , splitByPlaceholders } from '../css/placeholderUtils'
22
3+ let i = 0
4+
5+ const injectUniquePlaceholders = strArr =>
6+ strArr . reduce ( ( str , val , index , arr ) => {
7+ return str + val + ( index < arr . length - 1 ? makePlaceholder ( i ++ ) : '' )
8+ } , '' )
9+
310const makeMultilineCommentRegex = newlinePattern =>
411 new RegExp ( '\\/\\*[^!](.|' + newlinePattern + ')*?\\*\\/' , 'g' )
512const lineCommentStart = / \/ \/ / g
@@ -83,10 +90,10 @@ export const minifyRaw = minify('(?:\\\\r|\\\\n|\\r|\\n)')
8390export const minifyCooked = minify ( '[\\r\\n]' )
8491
8592export const minifyRawValues = rawValues =>
86- splitByPlaceholders ( minifyRaw ( rawValues . join ( makePlaceholder ( 123 ) ) ) , false )
93+ splitByPlaceholders ( minifyRaw ( injectUniquePlaceholders ( rawValues ) ) , false )
8794
8895export const minifyCookedValues = cookedValues =>
8996 splitByPlaceholders (
90- minifyCooked ( cookedValues . join ( makePlaceholder ( 123 ) ) ) ,
97+ minifyCooked ( injectUniquePlaceholders ( cookedValues ) ) ,
9198 false
9299 )
You can’t perform that action at this time.
0 commit comments