-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
See mathiasbynens/regexpu#16 and https://gist.github.com/mathiasbynens/bbe7f870208abcfec860.
var set = regenerate()
.addRange(0xD800, 0xDBFF) // lone high surrogates
.addRange(0xDC00, 0xDFFF); // lone low surrogates
var match = '𝌆'.match(RegExp('(' + set.toString() + ')'));
console.log(match == null);
// expected: true
// actual: false, since the surrogate halves are matched
Instead, it would make more sense to match lone surrogates only in such cases.
Metadata
Metadata
Assignees
Labels
No labels