aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/template-renderer-frame-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-25 19:55:31 -0400
committerGitHub <noreply@github.com>2021-03-25 19:55:31 -0400
commit4be5c8fd9f7860e701d0b7d3c8c0ee934bc60a4f (patch)
treedcd78316afdf00bbb67d3d1aa6555a9c8ea3efec /ext/js/templates/template-renderer-frame-main.js
parente7035dcff41d94f20c0bc8865d413412afc7c229 (diff)
Refactor Translator and dictionary entry format (#1553)
* Update test data * Move translator.js * Create new version of Translator * Update Backend * Update DictionaryDataUtil * Update DisplayGenerator * Create AnkiNoteDataCreator * Replace AnkiNoteData with AnkiNoteDataCreator * Update tests * Remove AnkiNoteData * Update test data * Remove translator-old.js * Add TypeScript interface definitions for the new translator data format
Diffstat (limited to 'ext/js/templates/template-renderer-frame-main.js')
-rw-r--r--ext/js/templates/template-renderer-frame-main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/js/templates/template-renderer-frame-main.js b/ext/js/templates/template-renderer-frame-main.js
index bfa18c82..c915d6b0 100644
--- a/ext/js/templates/template-renderer-frame-main.js
+++ b/ext/js/templates/template-renderer-frame-main.js
@@ -16,7 +16,7 @@
*/
/* globals
- * AnkiNoteData
+ * AnkiNoteDataCreator
* JapaneseUtil
* TemplateRenderer
* TemplateRendererFrameApi
@@ -25,8 +25,9 @@
(() => {
const japaneseUtil = new JapaneseUtil(null);
const templateRenderer = new TemplateRenderer(japaneseUtil);
+ const ankiNoteDataCreator = new AnkiNoteDataCreator(japaneseUtil);
templateRenderer.registerDataType('ankiNote', {
- modifier: ({data, marker}) => new AnkiNoteData(japaneseUtil, marker, data).createPublic()
+ modifier: ({data, marker}) => ankiNoteDataCreator.create(marker, data)
});
const templateRendererFrameApi = new TemplateRendererFrameApi(templateRenderer);
templateRendererFrameApi.prepare();