From 9110f22ea8822c414328a5a6210877f5506543b4 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Mon, 13 Jun 2022 22:22:50 -0400 Subject: [PATCH] debug --- package.json | 2 +- src/lib/phrase-building/compile.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fb50203..3b06e7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "2.9.4", + "version": "2.9.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/phrase-building/compile.ts b/src/lib/phrase-building/compile.ts index 2a9dfac..c7ed1a0 100644 --- a/src/lib/phrase-building/compile.ts +++ b/src/lib/phrase-building/compile.ts @@ -263,6 +263,7 @@ function arrangeVerbWNegative(head: T.PsString | undefined, restRaw: T.PsString[ export function compileEP(EP: T.EPRendered): { ps: T.SingleOrLengthOpts, e?: string[] }; export function compileEP(EP: T.EPRendered, combineLengths: true, blankOut?: BlankoutOptions): { ps: T.PsString[], e?: string[] }; export function compileEP(EP: T.EPRendered, combineLengths?: boolean, blankOut?: BlankoutOptions): { ps: T.SingleOrLengthOpts, e?: string[] } { + console.log("blankout options passed", blankOut); const psResult = compileEPPs(EP.blocks, EP.kids, EP.omitSubject, blankOut); return { ps: combineLengths ? flattenLengths(psResult) : psResult, @@ -287,6 +288,7 @@ function compileEPPs(blocks: T.Block[], kids: T.Kid[], omitSubject: boolean, bla } function combineIntoText(pieces: (T.Block | T.Kid)[], subjectPerson: T.Person, blankOut?: BlankoutOptions): T.PsString[] { + console.log("in text combining blankout", blankOut); const first = pieces[0]; const rest = pieces.slice(1); const firstPs = (blankOut?.equative && first.type === "equative") @@ -295,6 +297,7 @@ function combineIntoText(pieces: (T.Block | T.Kid)[], subjectPerson: T.Person, b // TODO: properly handle blanking out whole kids section ? [kidsBlank] : getPsFromPiece(first, subjectPerson); + console.log({ first, firstPs }); if (!rest.length) { return firstPs; }