Skip to content

Commit 0309c90

Browse files
authored
Clarify strict/lenient mode
1 parent e41d214 commit 0309c90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $parser = new \Sabberworm\CSS\Parser($css, $settings);
4343

4444
#### Strict parsing
4545

46-
To have the parser choke on invalid rules, supply a thusly configured `\Sabberworm\CSS\Settings` object:
46+
To have the parser throw an exception when encountering invalid/unknown constructs (as opposed to trying to ignore them and carry on parsing), supply a thusly configured `\Sabberworm\CSS\Settings` object:
4747

4848
```php
4949
$parser = new \Sabberworm\CSS\Parser(
@@ -52,6 +52,8 @@ $parser = new \Sabberworm\CSS\Parser(
5252
);
5353
```
5454

55+
Note that this will also disable a workaround for parsing the unquoted variant of the legacy IE-specific `filter` rule.
56+
5557
#### Disable multibyte functions
5658

5759
To achieve faster parsing, you can choose to have PHP-CSS-Parser use regular string functions instead of `mb_*` functions. This should work fine in most cases, even for UTF-8 files, as all the multibyte characters are in string literals. Still it’s not recommended using this with input you have no control over as it’s not thoroughly covered by test cases.

0 commit comments

Comments
 (0)