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 @@ -40,7 +40,7 @@ Please also have a look at our
40
40
41
41
### Removed
42
42
43
- - Remove the IE hack in ` Rule ` (#995 ))
43
+ - Remove the IE hack in ` Rule ` (#995 )
44
44
- Drop ` getLineNo() ` from the ` Renderable ` interface (#1038 )
45
45
- Remove ` OutputFormat::level() ` (#874 )
46
46
- Remove expansion of shorthand properties (#838 )
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 ()->usesLenientParsing ()) {
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 @@ -1036,6 +1036,28 @@ public function unexpectedTokenExceptionLineNo(): void
1036
1036
}
1037
1037
}
1038
1038
1039
+ /**
1040
+ * @test
1041
+ */
1042
+ public function ieHacksCauseExceptionInStrictMode (): void
1043
+ {
1044
+ $ this ->expectException (UnexpectedTokenException::class);
1045
+
1046
+ self ::parsedStructureForFile ('ie-hacks ' , Settings::create ()->beStrict ());
1047
+ }
1048
+
1049
+ /**
1050
+ * @test
1051
+ */
1052
+ public function ieHacksArePartiallyRemovedInLenientMode (): void
1053
+ {
1054
+ $ document = self ::parsedStructureForFile ('ie-hacks ' , Settings::create ()->withLenientParsing (true ));
1055
+
1056
+ $ expected = 'p {padding-right: .75rem;background-image: none;color: red; '
1057
+ . 'background-color: red;background-color: red;content: "red \\0";content: "red઼";} ' ;
1058
+ self ::assertSame ($ expected , $ document ->render ());
1059
+ }
1060
+
1039
1061
/**
1040
1062
* @depends files
1041
1063
*
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