Skip to content

Commit b089967

Browse files
committed
Remove duplicate <style> tags when processing components.
1 parent 5239a50 commit b089967

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
"require": {
1818
"php": "7.0.*|7.1.*|7.2.*|7.3.*|7.4.*|8.0.*|8.1.*",
19-
"ivopetkov/html5-dom-document-php": "2.*"
19+
"ivopetkov/html5-dom-document-php": "^2.5"
2020
},
2121
"require-dev": {
2222
"ivopetkov/docs-generator": "0.1.*"

src/HTMLServerComponentsCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function process($content, array $options = [])
191191
}
192192
}
193193

194-
$domDocument->modify(HTML5DOMDocument::FIX_MULTIPLE_TITLES | HTML5DOMDocument::FIX_DUPLICATE_METATAGS | HTML5DOMDocument::FIX_MULTIPLE_HEADS | HTML5DOMDocument::FIX_MULTIPLE_BODIES | HTML5DOMDocument::OPTIMIZE_HEAD);
194+
$domDocument->modify(HTML5DOMDocument::FIX_MULTIPLE_TITLES | HTML5DOMDocument::FIX_DUPLICATE_METATAGS | HTML5DOMDocument::FIX_MULTIPLE_HEADS | HTML5DOMDocument::FIX_MULTIPLE_BODIES | HTML5DOMDocument::OPTIMIZE_HEAD | HTML5DOMDocument::FIX_DUPLICATE_STYLES);
195195
return $domDocument->saveHTML();
196196
}
197197

0 commit comments

Comments
 (0)