Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix case-insensitive set operations (#104)
* fix: expand case foldings before intersection/subtraction * fix: maintain config.modifiersData when we don't transform modifiers * fix: pass through caseFoldFlags to computeClassStrings * add more test cases * fix: update the anchor/dot when modifiers are transformed * add more test cases * refactor: rename caseFold to caseEquivalents In spec, caseFold refers to mapping uppercase letter to the lowercase, here we are actually adding case equivalents to any given set of characters, such that they map to the same character via scf(). To avoid confusion, rename caseFold to caseEquivalents. * build: emit one way mappings to iu-foldings * polish: apply scf() to the class set operand * test: add more test cases * perf: apply scf only in intersection/subtraction * fix: apply SCF on unicode escape and wW * fix: generate \D and \S from UNICODE_IV_SET * fix: call scf on character class range and pass through shouldApplySCF to nested class * test: remove matches tests for node 6 compat The matches are already tested in unicode-set.js * Update data/character-class-escape-sets.js * Update scripts/case-mappings.js * Update scripts/character-class-escape-sets.js --------- Co-authored-by: Mathias Bynens <mathias@qiwi.be>
- Loading branch information