forgot to add - to pashto simplification

This commit is contained in:
Bill D 2021-03-16 18:17:55 +04:00
parent bd22266cfc
commit 12c551c1e3
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "0.2.9",
"version": "0.3.0",
"author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com",

View File

@ -18,6 +18,7 @@ const toTest: [string, string][] = [
["săr", "sar"],
["kawúl", "kawul"],
["sắr", "sar"],
["kaar-U-baar", "kaarUbaar"],
];
test("simplifyPhonetics should work", () => {

View File

@ -16,13 +16,14 @@ const matcher = {
ó: "o",
G: "g",
Ú: "U",
"-": "",
"\u0301": "",
" ": "",
"'": "",
"`": "",
};
const fRepRegex = / |Ú|á|ă|ú|é|í|ó|G|q|'|`|\u0301/g;
const fRepRegex = / |Ú|á|ă|ú|é|í|ó|G|q|'|`|-|\u0301/g;
export function simplifyPhonetics(f: string): string {
return f.replace(fRepRegex, (mtch) => {