From 19f6bf5a3a669cda311e5a3f162131d8a9823aef Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 7 Mar 2021 17:55:51 -0500 Subject: Refactor furigana segment data (#1502) * Remove redundant language assignment * Segment furigana from DisplayGenerator * Remove furiganaSegments from translator data * Add backwards compatibility for furiganaSegments * Update tests --- ext/js/templates/template-renderer-frame-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/templates') diff --git a/ext/js/templates/template-renderer-frame-main.js b/ext/js/templates/template-renderer-frame-main.js index a3892002..bfa18c82 100644 --- a/ext/js/templates/template-renderer-frame-main.js +++ b/ext/js/templates/template-renderer-frame-main.js @@ -26,7 +26,7 @@ const japaneseUtil = new JapaneseUtil(null); const templateRenderer = new TemplateRenderer(japaneseUtil); templateRenderer.registerDataType('ankiNote', { - modifier: ({data, marker}) => new AnkiNoteData(data, marker).createPublic() + modifier: ({data, marker}) => new AnkiNoteData(japaneseUtil, marker, data).createPublic() }); const templateRendererFrameApi = new TemplateRendererFrameApi(templateRenderer); templateRendererFrameApi.prepare(); -- cgit v1.2.3