diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-11-12 20:34:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 20:34:11 -0500 |
commit | ec021964b7311d02fdbc5531564074f145043b91 (patch) | |
tree | 7d82366ed48e64c3dbad00e37a5f717134c59439 /ext/bg/js/anki-note-builder.js | |
parent | f2ad94e54f2a110bf93aebfae33c808c497005be (diff) |
Compact tags refactor (#1021)
* Update translator to flag redundant tags instead of remove
* Update how compact tags are shown in the popup
* Pass compactTags option to note builder
* Update options templates
* Add options upgrade
* Add options upgrade test
Diffstat (limited to 'ext/bg/js/anki-note-builder.js')
-rw-r--r-- | ext/bg/js/anki-note-builder.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js index 4ac597da..d1e918c9 100644 --- a/ext/bg/js/anki-note-builder.js +++ b/ext/bg/js/anki-note-builder.js @@ -35,6 +35,7 @@ class AnkiNoteBuilder { duplicateScope='collection', resultOutputMode='split', compactGlossaries=false, + compactTags=false, modeOptions: {fields, deck, model}, audioDetails=null, screenshotDetails=null, @@ -70,7 +71,7 @@ class AnkiNoteBuilder { } }; - const data = this._createNoteData(definition, mode, context, resultOutputMode, compactGlossaries); + const data = this._createNoteData(definition, mode, context, resultOutputMode, compactGlossaries, compactTags); const formattedFieldValuePromises = []; for (const [, fieldValue] of fieldEntries) { const formattedFieldValuePromise = this._formatField(fieldValue, data, templates, errors); @@ -104,7 +105,7 @@ class AnkiNoteBuilder { // Private - _createNoteData(definition, mode, context, resultOutputMode, compactGlossaries) { + _createNoteData(definition, mode, context, resultOutputMode, compactGlossaries, compactTags) { const pitches = DictionaryDataUtil.getPitchAccentInfos(definition); const pitchCount = pitches.reduce((i, v) => i + v.pitches.length, 0); return { @@ -118,6 +119,7 @@ class AnkiNoteBuilder { modeTermKana: mode === 'term-kana', modeKanji: mode === 'kanji', compactGlossaries, + compactTags, context }; } |