File tree Expand file tree Collapse file tree 4 files changed +32
-8
lines changed Expand file tree Collapse file tree 4 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Please also have a look at our
36
36
37
37
### Removed
38
38
39
- - Remove the IE hack in ` Rule ` (#995 ))
39
+ - Remove the IE hack in ` Rule ` (#995 )
40
40
- Remove ` OutputFormat::level() ` (#874 )
41
41
- Remove expansion of shorthand properties (#838 )
42
42
- Remove ` Parser::setCharset/getCharset ` (#808 )
Original file line number Diff line number Diff line change @@ -86,13 +86,6 @@ public static function parse(ParserState $parserState): Rule
86
86
$ parserState ->consume (': ' );
87
87
$ value = Value::parseValue ($ parserState , self ::listDelimiterForRule ($ rule ->getRule ()));
88
88
$ rule ->setValue ($ value );
89
- if ($ parserState ->getSettings ()->bLenientParsing ) {
90
- while ($ parserState ->comes ('\\' )) {
91
- $ parserState ->consume ('\\' );
92
- $ parserState ->consume ();
93
- $ parserState ->consumeWhiteSpace ();
94
- }
95
- }
96
89
$ parserState ->consumeWhiteSpace ();
97
90
if ($ parserState ->comes ('! ' )) {
98
91
$ parserState ->consume ('! ' );
Original file line number Diff line number Diff line change @@ -1060,6 +1060,28 @@ public function unexpectedTokenExceptionLineNo(): void
1060
1060
}
1061
1061
}
1062
1062
1063
+ /**
1064
+ * @test
1065
+ */
1066
+ public function ieHacksCauseExceptionInStrictMode (): void
1067
+ {
1068
+ $ this ->expectException (UnexpectedTokenException::class);
1069
+
1070
+ self ::parsedStructureForFile ('ie-hacks ' , Settings::create ()->beStrict ());
1071
+ }
1072
+
1073
+ /**
1074
+ * @test
1075
+ */
1076
+ public function ieHacksAreRemovedInLenientMode (): void
1077
+ {
1078
+ $ document = self ::parsedStructureForFile ('ie-hacks ' , Settings::create ()->withLenientParsing (true ));
1079
+
1080
+ $ expected = 'p {padding-right: .75rem;background-image: none;color: red; '
1081
+ . 'background-color: red;background-color: red;content: "red \\0";content: "red઼";} ' ;
1082
+ self ::assertSame ($ expected , $ document ->render ());
1083
+ }
1084
+
1063
1085
/**
1064
1086
* @depends files
1065
1087
*
Original file line number Diff line number Diff line change
1
+ p {
2
+ padding-right : .75rem \9;
3
+ background-image : none \9;
4
+ color : red\9\0;
5
+ background-color : red \9 \0;
6
+ background-color : red \9 \0 !important ;
7
+ content : "red \9\0" ;
8
+ content : "red\0abc" ;
9
+ }
You can’t perform that action at this time.
0 commit comments