diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-08-01 16:23:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-01 16:23:33 -0400 |
commit | 838fd211c6737ce7e2b6802a43837cf4300b60d2 (patch) | |
tree | 24fb7fd7d8e6c494a3e51defc7f32a6c3aa73107 /ext/bg/js/settings/anki-templates.js | |
parent | 1e839cd230e53f822478f945cb415a8af2b09aef (diff) |
Pitch accent Anki field templates (#701)
* Template helper updates
* Add pitch data to exported field formatting data
* Reuse note data
* Add no-op
* Set up pitch accent templates
* Refactor version update functions
* Implement upgrade process for new Anki templates
* Consistency
* Update README and anki.js to have matching markers
Diffstat (limited to 'ext/bg/js/settings/anki-templates.js')
-rw-r--r-- | ext/bg/js/settings/anki-templates.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates.js index 88d4fe04..4e004308 100644 --- a/ext/bg/js/settings/anki-templates.js +++ b/ext/bg/js/settings/anki-templates.js @@ -144,7 +144,8 @@ class AnkiTemplatesController { let templates = options.anki.fieldTemplates; if (typeof templates !== 'string') { templates = this._defaultFieldTemplates; } const ankiNoteBuilder = new AnkiNoteBuilder({renderTemplate: api.templateRender.bind(api)}); - result = await ankiNoteBuilder.formatField(field, definition, mode, context, options, templates, exceptions); + const data = ankiNoteBuilder.createNoteData(definition, mode, context, options); + result = await ankiNoteBuilder.formatField(field, data, templates, exceptions); } } catch (e) { exceptions.push(e); |