(&mut self)
| 46 | } |
| 47 | |
| 48 | fn consume_escape_whitespace(&mut self) -> u8 { |
| 49 | if let Some(next_char) = self.as_str().chars().next() |
| 50 | && is_whitespace(next_char) |
| 51 | { |
| 52 | self.next(); |
| 53 | // https://drafts.csswg.org/css-syntax/#input-preprocessing |
| 54 | // Replace any U+000D CARRIAGE RETURN (CR) code points, U+000C FORM FEED (FF) code points, |
| 55 | // or pairs of U+000D CARRIAGE RETURN (CR) followed by U+000A LINE FEED (LF) in input by |
| 56 | // single U+000A LINE FEED (LF) code point. |
| 57 | if next_char == '\r' && self.as_str().starts_with('\n') { |
| 58 | self.next(); |
| 59 | 2 |
| 60 | } else { |
| 61 | 1 |
| 62 | } |
| 63 | } else { |
| 64 | 0 |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | fn parse_escape_sequence(&mut self) -> (char, u8) { |
| 69 | if let Some(c) = self.next() { |
no test coverage detected