Skip to content

Commit 3b91a30

Browse files
committed
is not
1 parent 3186398 commit 3b91a30

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

src/translator/fixer.ts

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ function fixComplement(complement: English.Complement): English.Complement {
222222
}
223223
function fixAdverbVerb(adverbVerb: English.AdverbVerb): English.AdverbVerb {
224224
const notIndex = adverbVerb.preAdverbs.findIndex((adverb) => adverb.negative);
225-
const [not, adverbs] = adverbVerb.verb.type === "modal" && notIndex !== -1
225+
const [not, adverbs] = (adverbVerb.verb.type === "modal" ||
226+
adverbVerb.verb.presentSingular === "is") && notIndex !== -1
226227
? [
227228
adverbVerb.preAdverbs[notIndex],
228229
adverbVerb.preAdverbs.toSpliced(notIndex, 1),
@@ -245,29 +246,27 @@ function fixMultipleVerb(
245246
}
246247
const first = newVerb[0];
247248
const notIndex = first.preAdverbs.findIndex((adverb) => adverb.negative);
248-
const newNewVerb: ReadonlyArray<AdverbVerb> =
249-
notIndex !== -1 && first.verb.type === "non-modal" &&
250-
first.verb.presentSingular !== "is"
251-
? [
252-
{
253-
verb: {
254-
type: "non-modal",
255-
presentPlural: "do",
256-
presentSingular: "does",
257-
past: "did",
258-
reduplicationCount: 1,
259-
emphasis: false,
260-
},
261-
preAdverbs: [],
262-
postAdverb: first.preAdverbs[notIndex],
263-
},
264-
{
265-
...first,
266-
preAdverbs: first.preAdverbs.toSpliced(notIndex, 1),
249+
const newNewVerb: ReadonlyArray<AdverbVerb> = notIndex !== -1
250+
? [
251+
{
252+
verb: {
253+
type: "non-modal",
254+
presentPlural: "do",
255+
presentSingular: "does",
256+
past: "did",
257+
reduplicationCount: 1,
258+
emphasis: false,
267259
},
268-
...newVerb.slice(1),
269-
]
270-
: newVerb;
260+
preAdverbs: [],
261+
postAdverb: first.preAdverbs[notIndex],
262+
},
263+
{
264+
...first,
265+
preAdverbs: first.preAdverbs.toSpliced(notIndex, 1),
266+
},
267+
...newVerb.slice(1),
268+
]
269+
: newVerb;
271270
return [
272271
newNewVerb[0],
273272
...newNewVerb

0 commit comments

Comments
 (0)