A path value's text as normalizeSpecial accepts it: `/^[A-Za-z_][\w:#]*$/`.
(s: &str)
| 1696 | |
| 1697 | /// A path value's text as normalizeSpecial accepts it: `/^[A-Za-z_][\w:#]*$/`. |
| 1698 | fn is_path_value_text(s: &str) -> bool { |
| 1699 | let mut chars = s.chars(); |
| 1700 | matches!(chars.next(), Some(c) if c.is_ascii_alphabetic() || c == '_') |
| 1701 | && chars.all(|c| c.is_ascii_alphanumeric() || c == '_' || c == ':' || c == '#') |
| 1702 | } |
| 1703 | |
| 1704 | /// JS `\s` (WhiteSpace ∪ LineTerminator), which `.replace(/\s+/g, '')` strips: |
| 1705 | /// unlike Rust's `char::is_whitespace`, U+FEFF yes and U+0085 no. |
no test coverage detected