aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/anki-template-renderer.js
diff options
context:
space:
mode:
authorm-edlund <me@fwegmann.com>2024-04-09 10:53:00 +0200
committerGitHub <noreply@github.com>2024-04-09 08:53:00 +0000
commit1d52f94379730ef587de87ce3ca8f1a30ac0a44a (patch)
treeb812a0aed52e415184e058d5f38e1f234ddaef76 /ext/js/templates/anki-template-renderer.js
parent11e58d616cffbadc5a0c6ab72e5fc803f8c4e70b (diff)
feature: add handlebar for jidoujisho pitch graph (#773)
* feat: add handlebar for jidoujisho pitch graph * fix: update handlebar upgrade test --------- Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Diffstat (limited to 'ext/js/templates/anki-template-renderer.js')
-rw-r--r--ext/js/templates/anki-template-renderer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/js/templates/anki-template-renderer.js b/ext/js/templates/anki-template-renderer.js
index 4bb56a4b..ae3e7a36 100644
--- a/ext/js/templates/anki-template-renderer.js
+++ b/ext/js/templates/anki-template-renderer.js
@@ -19,7 +19,7 @@
import {Handlebars} from '../../lib/handlebars.js';
import {createAnkiNoteData} from '../data/anki-note-data-creator.js';
import {getPronunciationsOfType, isNonNounVerbOrAdjective} from '../dictionary/dictionary-data-util.js';
-import {createPronunciationDownstepPosition, createPronunciationGraph, createPronunciationText} from '../display/pronunciation-generator.js';
+import {createPronunciationDownstepPosition, createPronunciationGraph, createPronunciationGraphJJ, createPronunciationText} from '../display/pronunciation-generator.js';
import {StructuredContentGenerator} from '../display/structured-content-generator.js';
import {CssStyleApplier} from '../dom/css-style-applier.js';
import {convertHiraganaToKatakana, convertKatakanaToHiragana, distributeFurigana, getKanaMorae, getPitchCategory, isMoraPitchHigh} from '../language/ja/japanese.js';
@@ -741,6 +741,8 @@ export class AnkiTemplateRenderer {
}
case 'graph':
return this._getPronunciationHtml(createPronunciationGraph(morae, downstepPosition));
+ case 'graph-jj':
+ return this._getPronunciationHtml(createPronunciationGraphJJ(morae, downstepPosition));
case 'position':
return this._getPronunciationHtml(createPronunciationDownstepPosition(downstepPosition));
default: