Commit e63c99b
committed
Allow preprocessing of the input stream to be skipped
This change adds an optional isPreprocessed boolean parameter to the
StyleSheetParser() constructor; if the value of that parameter is true,
the steps from https://drafts.csswg.org/css-syntax/#input-preprocessing
for preprocessing the input stream are skipped — so UnescapeFilterReader()
is not called.
This is useful in a context where the input stream has already been
preprocessed — for example, if the contents of the stylesheet being
parsed are from an HTML document that has already been parsed by a
conformant HTML parser (which is the case, for example, when the
https://github.com/validator/validator HTML checker calls the code).1 parent eca30bb commit e63c99b
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
296 | | - | |
| 302 | + | |
| 303 | + | |
297 | 304 | | |
298 | 305 | | |
299 | 306 | | |
| |||
0 commit comments