From 3c6f3aaec5fbc7e7803cdb6602e22dbcc18b86a5 Mon Sep 17 00:00:00 2001 From: Bill D Date: Thu, 18 Mar 2021 09:40:08 +0400 Subject: [PATCH] =?UTF-8?q?Bug=20fix=20on=20the=20ordering=20of=20short=20?= =?UTF-8?q?perfect=20forms=20on=20the=20shortest=20forms=20of=20the=20perf?= =?UTF-8?q?ect=20forms,=20the=20insertable=20particles=20should=20get=20in?= =?UTF-8?q?serted=20between=20the=20past=20participle=20and=20equative,=20?= =?UTF-8?q?eg.=20=D9=84=DB=8C=D8=AF=D9=84=DB=8C=20=D8=A8=D9=87=20=D8=AF?= =?UTF-8?q?=DB=90=20=D9=88=D9=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/lib/add-pronouns.ts | 15 ++++++++------- src/lib/verb-info.ts | 1 - 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 480e396..a8a960b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "0.3.0", + "version": "0.3.1", "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/add-pronouns.ts b/src/lib/add-pronouns.ts index deef56e..d31dfe5 100644 --- a/src/lib/add-pronouns.ts +++ b/src/lib/add-pronouns.ts @@ -399,29 +399,30 @@ function makeOnlyMiniForm( return [reorderedNegativeAfterSplitHead(splitHead)]; } // only mini without split + const [beginning, end] = splitOffLeapfrogWord(ps); if (!displayForm.reorderWithNegative || !negative) { if (objComplement) { return [ concatPsString( objComplement, - " ", + psStringContains(ps, concatPsString(baParticle, " ")) ? concatPsString(" ", baParticle, " ") : " ", concatPsString(mini, " "), negative ? concatPsString(" ", nuParticle, " ") : "", - removeObjComp(objComplement, ps), + removeObjComp(objComplement, psRemove(ps, concatPsString(baParticle, " "))), ) ]; } return [ concatPsString( - psRemove(ps, concatPsString(baParticle, " ")), + psRemove(beginning, concatPsString(baParticle, " ")), " ", - psStringContains(ps, concatPsString(baParticle, " ")) ? concatPsString(baParticle, " ") : "", + psStringContains(beginning, concatPsString(baParticle, " ")) ? concatPsString(baParticle, " ") : "", mini, - negative ? concatPsString(" ", nuParticle) : "", - ) + negative ? concatPsString(" ", nuParticle) : " ", + end, + ), ]; } - const [beginning, end] = splitOffLeapfrogWord(ps); if (objComplement) { return [ ensureBaAt( diff --git a/src/lib/verb-info.ts b/src/lib/verb-info.ts index 6d0f9f1..d15836a 100644 --- a/src/lib/verb-info.ts +++ b/src/lib/verb-info.ts @@ -80,7 +80,6 @@ export function getVerbInfo( const transitivity = getTransitivity(entry); if (type !== "simple") { if (!complement) { - console.log(entry); throw new Error("complement required for compound verb"); } if (type === "dynamic compound") {