From 4e32a1942ff2478b557af1b900b3f3282d7ce55b Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 5 Jul 2023 18:23:56 +0200 Subject: fix examples/furigana-html.ts --- api/word.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api') diff --git a/api/word.ts b/api/word.ts index 4d77d97..b7fc3e6 100644 --- a/api/word.ts +++ b/api/word.ts @@ -4,7 +4,7 @@ import { ParseToken } from "../language/types.ts"; import Japanese, { JapaneseFormatter } from "./japanese.ts"; import "../util/string.ts"; -import { Tag } from "../language/tags.ts"; +import { Tag, TagGroup } from "../language/tags.ts"; export default class Word extends APIBase { /** @prop dictionary form of verb if this word is a verb */ @@ -28,7 +28,7 @@ export default class Word extends APIBase { this.filler = false; input = input as ParseToken; this.base = new Japanese(input.writing, input.reading); - if (input.tags.anyOf(Object.values(Tag.Class.Verb))) { + if (input.tags.anyOf(TagGroup.Conjugable as string[])) { var writingCommon = input.writing.cmpLen(input.source); var readingCommon = input.reading.cmpLen(input.source); var stemLength = Math.max(writingCommon, readingCommon); @@ -39,7 +39,7 @@ export default class Word extends APIBase { } else { this.text = this.base; } - this.outputKanji = !input.source.kanaOnly(); // only output kanji if input also uses kanji + this.outputKanji = input.source.hasKanji(); // only output kanji if input also uses kanji } } -- cgit v1.2.3