ability to leave out negatives

This commit is contained in:
lingdocs 2022-09-12 17:59:59 +04:00
parent c408737901
commit 54b42b7e70
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "3.8.9",
"version": "3.9.0",
"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",

View File

@ -31,7 +31,13 @@ import {
} from "../../lib/misc-helpers";
type BlankoutOptions = { equative?: boolean, ba?: boolean, kidsSection?: boolean, verb?: boolean };
type BlankoutOptions = {
equative?: boolean,
ba?: boolean,
kidsSection?: boolean,
verb?: boolean,
negative?: boolean,
};
// function compilePs({ blocks, kids, verb: { head, rest }, VP }: CompilePsInput): T.SingleOrLengthOpts<T.PsString[]> {
// if ("long" in rest) {
@ -175,6 +181,8 @@ function combineIntoText(piecesWVars: (T.Block | T.Kid | T.PsString)[][], subjec
? [blank]
: ((blankOut?.ba) && "kid" in first && first.kid.type === "ba")
? [kidsBlank]
: (blankOut?.negative && "block" in first && first.block.type === "negative")
? [{ p: "", f: "" }]
: getPsFromPiece(first, subjectPerson);
if (!rest.length) {
return firstPs;