File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
lib/internal/Magento/Framework/View/Template/Html Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -113,22 +113,26 @@ public function minify($file)
113
113
{
114
114
$ file = $ this ->rootDirectory ->getRelativePath ($ file );
115
115
$ content = preg_replace (
116
- '#((?:<\?php\s+(?!echo)[^\?]*)\?>)\s+ # ' ,
117
- '$1 ' ,
116
+ '#\s+</ # ' ,
117
+ '</ ' ,
118
118
preg_replace (
119
- '#(?<! ' . implode ( ' | ' , $ this -> inlineHtmlTags ) . ' )\> \< # ' ,
120
- '>< ' ,
119
+ '#((?:<\?php\s+(?!echo)[^\?]*)\?>)\s+ # ' ,
120
+ '$1 ' ,
121
121
preg_replace (
122
- '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+) '
123
- . '(?:<(?>textarea|pre|script)\b|\z))# ' ,
124
- ' ' ,
122
+ '#(?<! ' . implode ('| ' , $ this ->inlineHtmlTags ) . ')\> \<# ' ,
123
+ '>< ' ,
125
124
preg_replace (
126
- '#(?<!:)//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*# ' ,
127
- '' ,
125
+ '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+) '
126
+ . '(?:<(?>textarea|pre|script)\b|\z))# ' ,
127
+ ' ' ,
128
128
preg_replace (
129
- '#(?<!:)//[^\n\r]*(\s\?\>)# ' ,
130
- '$1 ' ,
131
- $ this ->rootDirectory ->readFile ($ file )
129
+ '#(?<!:)//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*# ' ,
130
+ '' ,
131
+ preg_replace (
132
+ '#(?<!:)//[^\n\r]*(\s\?\>)# ' ,
133
+ '$1 ' ,
134
+ $ this ->rootDirectory ->readFile ($ file )
135
+ )
132
136
)
133
137
)
134
138
)
You can’t perform that action at this time.
0 commit comments