Chain our debug setting through to CSS Parser's leniency setting
Opened this issue · 0 comments
JakeQZ commented
See MyIntervals/PHP-CSS-Parser#346.
We just need to pass on CssInliner::$debug
through Pelago\Emogrifier\Css\CssDocument
to Sabberworm\CSS\Parser
, mostly with one line of code to be added:
$parserSettings = \Sabberworm\CSS\Settings::create()->withLenientParsing(!$debug);
This will resolve one of the failing tests in #1129.
But life is never simple. Simply applying the requried code change leads to a whole bunch of additional test failures, which need to be looked into. On initial glance, quite a few are because we expect an exception for malformed CSS but would now be getting a different class of exception. But there are other failures of a different nature too.