File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ export function contextClause(
234234 ) ;
235235 default :
236236 return ArrayResult . concat < ReadonlyArray < English . Clause > > (
237- new ArrayResult ( nullableAsArray ( unwrap ( contextClause ) ) )
237+ new ArrayResult ( nullableAsArray ( unwrapSingleWord ( contextClause ) ) )
238238 . flatMap ( ( wordUnit ) =>
239239 fromSimpleDefinition (
240240 wordUnit ,
@@ -251,7 +251,7 @@ export function contextClause(
251251 ) ;
252252 }
253253}
254- export function unwrap (
254+ export function unwrapSingleWord (
255255 clause : TokiPona . Clause ,
256256) : null | TokiPona . WordUnit {
257257 if ( clause . type === "phrases" && clause . phrases . type === "single" ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { dictionary } from "../dictionary.ts";
44import * as TokiPona from "../parser/ast.ts" ;
55import { definitionAsPlainString } from "./as_string.ts" ;
66import * as English from "./ast.ts" ;
7- import { clause , contextClause , unwrap } from "./clause.ts" ;
7+ import { clause , contextClause , unwrapSingleWord } from "./clause.ts" ;
88import { FilteredError , TranslationTodoError } from "./error.ts" ;
99import { noEmphasis } from "./word.ts" ;
1010import { fromSimpleDefinition } from "./word_unit.ts" ;
@@ -107,7 +107,9 @@ function sentence(
107107 const interjectionClause : ArrayResult < English . Clause > =
108108 sentence . contextClauses . length === 0 &&
109109 sentence . startingParticle == null
110- ? new ArrayResult ( nullableAsArray ( unwrap ( sentence . finalClause ) ) )
110+ ? new ArrayResult (
111+ nullableAsArray ( unwrapSingleWord ( sentence . finalClause ) ) ,
112+ )
111113 . flatMap ( ( wordUnit ) =>
112114 fromSimpleDefinition (
113115 wordUnit ,
You can’t perform that action at this time.
0 commit comments