diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-04-02 19:09:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 19:09:21 -0400 |
commit | dabda86259d78ee66125ebf2cff15a7619e0b5da (patch) | |
tree | 721043546abc01d5c5a2d17f2f2abd8e34ce2a53 /ext/js/templates/template-renderer-frame-main.js | |
parent | 28fa3fa795d564135940e8aff52b987a5960f15c (diff) |
Optimize template renderer (#1585)
* Add renderMulti
* Batch template rendering
* Update tests
Diffstat (limited to 'ext/js/templates/template-renderer-frame-main.js')
-rw-r--r-- | ext/js/templates/template-renderer-frame-main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/templates/template-renderer-frame-main.js b/ext/js/templates/template-renderer-frame-main.js index 40ecf308..3d61295d 100644 --- a/ext/js/templates/template-renderer-frame-main.js +++ b/ext/js/templates/template-renderer-frame-main.js @@ -27,7 +27,8 @@ const templateRenderer = new TemplateRenderer(japaneseUtil); const ankiNoteDataCreator = new AnkiNoteDataCreator(japaneseUtil); templateRenderer.registerDataType('ankiNote', { - modifier: ({marker, commonData}) => ankiNoteDataCreator.create(marker, commonData) + modifier: ({marker, commonData}) => ankiNoteDataCreator.create(marker, commonData), + composeData: (marker, commonData) => ({marker, commonData}) }); const templateRendererFrameApi = new TemplateRendererFrameApi(templateRenderer); templateRendererFrameApi.prepare(); |