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