MyIntervals / PHP-CSS-Parser

A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS
http://www.sabberworm.com/blog/2010/6/10/php-css-parser
MIT License
1.75k stars 148 forks source link

CSS comments lead to exception #680

Open oliverklee opened 2 weeks ago

oliverklee commented 2 weeks ago

https://github.com/MyIntervals/emogrifier/actions/runs/10573250071/job/29292403949?pr=1248

1) Pelago\Emogrifer\Tests\Unit\CssInlinerTest::inlineCssFiltersUnneededCssThings with data set "CSS comments with one asterisk" ('p {color: #000;/* black */}', 'black')
Sabberworm\CSS\Parsing\UnexpectedTokenException: Identifier expected. Got “}” [line no: 1]

/home/runner/work/emogrifier/emogrifier/vendor/sabberworm/php-css-parser/src/Parsing/ParserState.php:143

We need to cover this with a test and fix it in main and for v8.x

@ziegenberg Would you be willing to have a look at this?

ziegenberg commented 2 weeks ago

Yes, I'll have a look. Maybe tomorrow but probably next week.

oliverklee commented 2 weeks ago

Thanks! :heart: