fix spelling conversion

This commit is contained in:
lingdocs 2021-08-31 13:51:16 +04:00
parent ffcae9bdaa
commit 3d6e02f6fa
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "0.9.1",
"version": "0.9.2",
"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

@ -20,7 +20,7 @@ export function convertSpelling(input: string, spelling: T.Spelling): string {
return input;
}
return input.replace(/ای(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "ائ")
.replace(/وی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, ی")
.replace(/وی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, ئ")
.replace(/ی(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, "ے")
.replace(/ي(?![\u0621-\u065f\u0670-\u06d3\u06d5])/g, (spelling === "Pakistani ی")
? "ی"