Skip to main content

normalize_for_fuzzy_match

Function normalize_for_fuzzy_match 

Source
pub fn normalize_for_fuzzy_match(text: &str) -> String
Expand description

Normalize text for fuzzy matching, mirroring pi’s normalizeForFuzzyMatch: NFKC-fold, strip per-line trailing whitespace, and fold smart quotes / dashes / special spaces to their ASCII equivalents. Lets an edit land when the model’s oldText differs only in cosmetic whitespace or Unicode look-alikes.