JS `\s` (WhiteSpace ∪ LineTerminator): unlike Rust's `char::is_whitespace`, U+FEFF yes and U+0085 no.
(c: char)
| 1660 | /// JS `\s` (WhiteSpace ∪ LineTerminator): unlike Rust's |
| 1661 | /// `char::is_whitespace`, U+FEFF yes and U+0085 no. |
| 1662 | fn is_js_space(c: char) -> bool { |
| 1663 | matches!( |
| 1664 | c, |
| 1665 | '\t' | '\n' | '\x0B' | '\x0C' | '\r' | ' ' | '\u{00A0}' | '\u{1680}' |
| 1666 | | '\u{2000}'..='\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' |
| 1667 | | '\u{3000}' | '\u{FEFF}' |
| 1668 | ) |
| 1669 | } |
| 1670 | |
| 1671 | /// PHP_OWN_DIRECTORY (languages/php.ts), matched on the head's text with JS |
| 1672 | /// whitespace removed: `__DIR__`, `dirname(__FILE__)`, `\dirname(__DIR__)`, |
no outgoing calls
no test coverage detected