aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox/anki-template-renderer.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-05-14 18:12:57 -0400
committerGitHub <noreply@github.com>2022-05-14 18:12:57 -0400
commit5dcc2315d242bcec29cc478618d448c941f73ab1 (patch)
tree9d36e666cc71bb1c1a89c725eaa9fdaa5c938626 /ext/js/templates/sandbox/anki-template-renderer.js
parent6a74746113c724e750620d10b58ad6bac94060c9 (diff)
Structured content auto language (#2131)
* Pass JapaneseUtil instance to StructuredContentGenerator * Move body of createStructuredContent to an internal function * Create _createStructuredContentGenericElement * Wrap structured content in a <span> * Change _createStructuredContent to _appendStructuredContent * Add public appendStructuredContent function * Add missing return * Remove unused _createDocumentFragment * Automatically assign lang=ja for content with Japanese characters without an explicit language * Add test
Diffstat (limited to 'ext/js/templates/sandbox/anki-template-renderer.js')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index c75f92d3..45dda06c 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -536,7 +536,7 @@ class AnkiTemplateRenderer {
_createStructuredContentGenerator(data) {
const contentManager = new AnkiTemplateRendererContentManager(this._mediaProvider, data);
- const instance = new StructuredContentGenerator(contentManager, document);
+ const instance = new StructuredContentGenerator(contentManager, this._japaneseUtil, document);
this._cleanupCallbacks.push(() => contentManager.unloadAll());
return instance;
}