From de13db2e5bc0fe1176bd912be871be2cc853085e Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Tue, 26 Jul 2022 16:08:03 -0500 Subject: [PATCH] fix accent on passive roots and stems - unfortunately just for the verb info display for now --- package.json | 2 +- src/lib/verb-info.ts | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 65e65b3..e321a84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.5.5", + "version": "3.5.6", "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/verb-info.ts b/src/lib/verb-info.ts index b45f23f..67f49ad 100644 --- a/src/lib/verb-info.ts +++ b/src/lib/verb-info.ts @@ -983,7 +983,6 @@ function makeDynamicPerfectiveSplit(comp: T.PsString, auxSplit: T.SplitInfo): T. } export function getPassiveRootsAndStems(info: T.NonComboVerbInfo, withTails?: boolean): T.PassiveRootsStems | undefined { - console.log({ withTails }); if (info.transitivity === "intransitive") return undefined; return { stem: getPassiveStem(info.root, info.root.perfectiveSplit, withTails), @@ -1074,7 +1073,7 @@ function getPassivePastParticiple(root: T.OptionalPersonInflections, aspect: T.Aspect): T.FullForm { @@ -1086,7 +1085,11 @@ function getPassiveStemAspect(root: T.FullForm, aspect: T.Aspect): T "femPlur": getPassiveStemAspect(root.femPlur, aspect) as T.PsString, }; } - return concatPsString(getLong(root), " ", stativeAux.intransitive.info.stem[aspect]); + return concatPsString( + aspect === "perfective" ? removeAccents(getLong(root)) : getLong(root), + " ", + stativeAux.intransitive.info.stem[aspect], + ); } function getPassiveRootAspect(root: T.OptionalPersonInflections>, aspect: T.Aspect): T.OptionalPersonInflections> { @@ -1099,9 +1102,18 @@ function getPassiveRootAspect(root: T.OptionalPersonInflections