things passed to remove accents were stripping out anything other than the ps
This commit is contained in:
parent
02d20e8c00
commit
54a8f602f3
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/pashto-inflector",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.5",
|
||||
"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",
|
||||
|
|
|
@ -112,10 +112,10 @@ export function removeAccents(s: T.PsString): T.PsString;
|
|||
export function removeAccents(s: string): string;
|
||||
export function removeAccents(s: T.PsString | string): T.PsString | string {
|
||||
if (typeof s !== "string") {
|
||||
return makePsString(
|
||||
s.p,
|
||||
removeAccents(s.f),
|
||||
);
|
||||
return {
|
||||
...s,
|
||||
f: removeAccents(s.f),
|
||||
};
|
||||
}
|
||||
return s.replace(/á|é|í|ó|ú|Ú/, (match) => {
|
||||
const r = accentReplacer.find((x) => x.accented === match);
|
||||
|
|
Loading…
Reference in New Issue