diff options
Diffstat (limited to 'ext/js/data/sandbox/anki-note-data-creator.js')
-rw-r--r-- | ext/js/data/sandbox/anki-note-data-creator.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js index 5a608cd2..fc787a66 100644 --- a/ext/js/data/sandbox/anki-note-data-creator.js +++ b/ext/js/data/sandbox/anki-note-data-creator.js @@ -17,6 +17,7 @@ */ import {DictionaryDataUtil} from '../../dictionary/dictionary-data-util.js'; +import {distributeFurigana} from '../../language/japanese.js'; /** * This class is used to convert the internal dictionary entry format to the @@ -24,15 +25,6 @@ import {DictionaryDataUtil} from '../../dictionary/dictionary-data-util.js'; */ export class AnkiNoteDataCreator { /** - * Creates a new instance. - * @param {import('../../language/sandbox/japanese-util.js').JapaneseUtil} japaneseUtil An instance of `JapaneseUtil`. - */ - constructor(japaneseUtil) { - /** @type {import('../../language/sandbox/japanese-util.js').JapaneseUtil} */ - this._japaneseUtil = japaneseUtil; - } - - /** * Creates a compatibility representation of the specified data. * @param {string} marker The marker that is being used for template rendering. * @param {import('anki-templates-internal').CreateDetails} details Information which is used to generate the data. @@ -860,7 +852,7 @@ export class AnkiNoteDataCreator { _getTermHeadwordFuriganaSegments(term, reading) { /** @type {import('anki-templates').FuriganaSegment[]} */ const result = []; - for (const {text, reading: reading2} of this._japaneseUtil.distributeFurigana(term, reading)) { + for (const {text, reading: reading2} of distributeFurigana(term, reading)) { result.push({text, furigana: reading2}); } return result; |