From ea5196c803e697a7115616b28b0c896b842ad7da Mon Sep 17 00:00:00 2001 From: adueck Date: Fri, 13 Jan 2023 16:34:08 +0500 Subject: [PATCH] ability to blank out predicate in EP compiling --- package-lock.json | 4 ++-- package.json | 2 +- src/components/package.json | 2 +- src/lib/package.json | 2 +- src/lib/src/phrase-building/compile.ts | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b59c8e..6b9f9b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pashto-inflector", - "version": "5.3.2", + "version": "5.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pashto-inflector", - "version": "5.3.2", + "version": "5.3.3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index bc76d37..781635f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pashto-inflector", - "version": "5.3.2", + "version": "5.3.3", "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/components/package.json b/src/components/package.json index bd7849b..56a5486 100644 --- a/src/components/package.json +++ b/src/components/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/ps-react", - "version": "5.3.2", + "version": "5.3.3", "description": "Pashto inflector library module with React components", "main": "dist/components/library.js", "module": "dist/components/library.js", diff --git a/src/lib/package.json b/src/lib/package.json index 551aa70..21b2887 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/inflect", - "version": "5.3.2", + "version": "5.3.3", "description": "Pashto inflector library", "main": "dist/index.js", "types": "dist/lib/library.d.ts", diff --git a/src/lib/src/phrase-building/compile.ts b/src/lib/src/phrase-building/compile.ts index 552e458..6e4c012 100644 --- a/src/lib/src/phrase-building/compile.ts +++ b/src/lib/src/phrase-building/compile.ts @@ -37,6 +37,7 @@ type BlankoutOptions = { kidsSection?: boolean, verb?: boolean, negative?: boolean, + predicate?: boolean, }; // function compilePs({ blocks, kids, verb: { head, rest }, VP }: CompilePsInput): T.SingleOrLengthOpts { @@ -176,7 +177,8 @@ function combineIntoText(piecesWVars: (T.Block | T.Kid | T.PsString)[][], subjec ? [first] : ( (blankOut?.equative && "block" in first && first.block.type === "equative") || - (blankOut?.verb && "block" in first && isRenderedVerbB(first.block)) + (blankOut?.verb && "block" in first && isRenderedVerbB(first.block)) || + (blankOut?.predicate && "block" in first && first.block.type === "predicateSelection") ) ? [blank] : ((blankOut?.ba) && "kid" in first && first.kid.type === "ba")