aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/templates/sandbox')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index b721fadc..ae89aade 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -607,13 +607,16 @@ class AnkiTemplateRenderer {
_hiragana(context, ...args) {
const ii = args.length - 1;
- const value = (ii > 0 ? args[0] : args[ii].fn(context));
- return this._japaneseUtil.convertKatakanaToHiragana(value);
+ const options = args[ii];
+ const {keepProlongedSoundMarks} = options.hash;
+ const value = (ii > 0 ? args[0] : options.fn(context));
+ return this._japaneseUtil.convertKatakanaToHiragana(value, keepProlongedSoundMarks === true);
}
_katakana(context, ...args) {
const ii = args.length - 1;
- const value = (ii > 0 ? args[0] : args[ii].fn(context));
+ const options = args[ii];
+ const value = (ii > 0 ? args[0] : options.fn(context));
return this._japaneseUtil.convertHiraganaToKatakana(value);
}
}