Commit 4868df6
authored
Use v RegExp flag instead of u for <input pattern>
This makes the pattern attribute more powerful, enabling the use of RegExp set notation syntax and properties of strings in its values.
Differences with the previous u flag-based behavior:
- [FEATURE] Previously invalid patterns now become valid, e.g.:
pattern="[\p{ASCII_Hex_Digit}--[Ff]]"
pattern="\p{RGI_Emoji}"
pattern="[_\q{a|bc|def}]"
- [BREAKING CHANGE] Some previously valid patterns are now errors, specifically those with a character class including either an unescaped special character ( ) [ ] { } / - \ | or a double punctuator.
- [STATUS QUO] Other previously valid patterns still behave the same. (Other than the above-mentioned features, the v flags only differs in behavior from the u flag w.r.t. case-insensitive matching, but the pattern attribute uses case-sensitive matching.)
Tests: web-platform-tests/wpt#38547.
Fixes #7908.1 parent 5e4c22e commit 4868df6
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3032 | 3032 | | |
3033 | 3033 | | |
3034 | 3034 | | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
3035 | 3038 | | |
3036 | 3039 | | |
3037 | 3040 | | |
| |||
50855 | 50858 | | |
50856 | 50859 | | |
50857 | 50860 | | |
50858 | | - | |
| 50861 | + | |
| 50862 | + | |
50859 | 50863 | | |
50860 | 50864 | | |
50861 | 50865 | | |
| |||
50871 | 50875 | | |
50872 | 50876 | | |
50873 | 50877 | | |
50874 | | - | |
| 50878 | + | |
50875 | 50879 | | |
50876 | 50880 | | |
50877 | 50881 | | |
| |||
50886 | 50890 | | |
50887 | 50891 | | |
50888 | 50892 | | |
50889 | | - | |
| 50893 | + | |
50890 | 50894 | | |
50891 | 50895 | | |
50892 | 50896 | | |
| |||
133426 | 133430 | | |
133427 | 133431 | | |
133428 | 133432 | | |
| 133433 | + | |
| 133434 | + | |
| 133435 | + | |
133429 | 133436 | | |
133430 | 133437 | | |
133431 | 133438 | | |
| |||
0 commit comments