forked from dtolnay/unicode-ident
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #2 Unicode 4.1 through Unicode 15 omitted these two characters from ID_Continue by accident. However, this accident was corrected in Unicode 15.1. Any JS VM that supports ES6+ but that uses a version of Unicode earlier than 15.1 will consider these to be a syntax error, so we deliberately omit these characters from the set of identifiers that are valid in both ES5 and ES6+. For more info see 2.2 in https://www.unicode.org/L2/L2023/23160-utc176-properties-recs.pdf
- Loading branch information
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use unicode_id_start::is_id_continue_unicode; | ||
|
||
#[test] | ||
fn legacy_katakana_middle_dot_patch() { | ||
// U+30FB KATAKANA MIDDLE DOT | ||
// https://util.unicode.org/UnicodeJsps/character.jsp?a=30FB | ||
assert!(!is_id_continue_unicode('・')); | ||
// U+FF65 HALFWIDTH KATAKANA MIDDLE DOT | ||
// https://util.unicode.org/UnicodeJsps/character.jsp?a=FF65 | ||
assert!(!is_id_continue_unicode('・')); | ||
} |