From 189ed32eca98bc787021197c5f98d47a6e400026 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Mon, 11 Jul 2022 12:52:01 -0500 Subject: [PATCH] fixed bug with the complement and perfect in phrase builder --- package.json | 2 +- src/lib/phrase-building/compile.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f7f6ec8..c1a1ad5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.3.8", + "version": "3.3.9", "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/phrase-building/compile.ts b/src/lib/phrase-building/compile.ts index 4830b8d..1f6dafa 100644 --- a/src/lib/phrase-building/compile.ts +++ b/src/lib/phrase-building/compile.ts @@ -226,7 +226,11 @@ function getPsFromPiece(piece: T.Block | T.Kid, subjectPerson: T.Person): T.PsSt } if (piece.block.type === "perfectParticipleBlock") { // getLong is just for type safety - we will have split up the length options earlier in compileVPPs - return getLong(piece.block.ps); + const verbPs = getLong(piece.block.ps); + if (piece.block.complement) { + return combineComplementWVerbPs(piece.block.complement, verbPs); + } + return verbPs; } if (piece.block.type === "perfectEquativeBlock") { // just using the short one for now - it will only be short anyways