ability to leave out negatives
This commit is contained in:
parent
c408737901
commit
54b42b7e70
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "3.8.9",
|
"version": "3.9.0",
|
||||||
"author": "lingdocs.com",
|
"author": "lingdocs.com",
|
||||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||||
"homepage": "https://verbs.lingdocs.com",
|
"homepage": "https://verbs.lingdocs.com",
|
||||||
|
|
|
@ -31,7 +31,13 @@ import {
|
||||||
} from "../../lib/misc-helpers";
|
} 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[]> {
|
// function compilePs({ blocks, kids, verb: { head, rest }, VP }: CompilePsInput): T.SingleOrLengthOpts<T.PsString[]> {
|
||||||
// if ("long" in rest) {
|
// if ("long" in rest) {
|
||||||
|
@ -175,6 +181,8 @@ function combineIntoText(piecesWVars: (T.Block | T.Kid | T.PsString)[][], subjec
|
||||||
? [blank]
|
? [blank]
|
||||||
: ((blankOut?.ba) && "kid" in first && first.kid.type === "ba")
|
: ((blankOut?.ba) && "kid" in first && first.kid.type === "ba")
|
||||||
? [kidsBlank]
|
? [kidsBlank]
|
||||||
|
: (blankOut?.negative && "block" in first && first.block.type === "negative")
|
||||||
|
? [{ p: "", f: "" }]
|
||||||
: getPsFromPiece(first, subjectPerson);
|
: getPsFromPiece(first, subjectPerson);
|
||||||
if (!rest.length) {
|
if (!rest.length) {
|
||||||
return firstPs;
|
return firstPs;
|
||||||
|
|
Loading…
Reference in New Issue