hypothesis / h

Annotate with anyone, anywhere.
https://hypothes.is/
BSD 2-Clause "Simplified" License
2.96k stars 427 forks source link

Simplify string normalization using modern JS functions #9109

Open robertknight opened 1 day ago

robertknight commented 1 day ago

Simplify the utility for normalizing strings now that String.prototype.normalize and \p escapes [2] are widely available.

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#browser_compatibility