From 54a8f602f3a7ef9fcab52853c9b6baea3c4e712b Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Fri, 25 Mar 2022 16:00:29 +0500 Subject: [PATCH] things passed to remove accents were stripping out anything other than the ps --- package.json | 2 +- src/lib/accent-helpers.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6dc1de1..477b844 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/lib/accent-helpers.ts b/src/lib/accent-helpers.ts index 5e6514c..29f067e 100644 --- a/src/lib/accent-helpers.ts +++ b/src/lib/accent-helpers.ts @@ -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);