Open danielweck opened 4 years ago
Side note: there is already an "underscore" transliteration for a similar-looking Arabic character: https://github.com/sindresorhus/transliterate/blob/405813848bd8555efcaaab298c95ba2daf53cbdc/replacements.js#L245
We can do:
string.replace(/\p{Dash_Punctuation}/gu, '-');
to cover all the dashes.
Full reference: https://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt
There are many different variants which can all be normalized to
-
: https://www.compart.com/en/unicode/category/Pd http://jkorpela.fi/dashes.htmlHowever, to keep things simple: https://en.wikipedia.org/wiki/Wikipedia:Hyphens_and_dashes
=>