From 9577449e4bd2b7665e9161e50035393ef200205f Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Sat, 2 Mar 2024 06:28:09 -0500 Subject: Fix sentence-furigana template (#733) --- test/options-util.test.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/options-util.test.js b/test/options-util.test.js index 8c2bd775..9ccbd8ad 100644 --- a/test/options-util.test.js +++ b/test/options-util.test.js @@ -599,7 +599,7 @@ function createOptionsUpdatedTestData1() { } ], profileCurrent: 0, - version: 26, + version: 27, global: { database: { prefixWildcardsSupported: false @@ -1690,6 +1690,33 @@ describe('OptionsUtil', () => { {{~#*inline "pitch-accent-categories"~}} {{~#each (pitchCategories @root)~}}{{~.~}}{{~#unless @last~}},{{~/unless~}}{{~/each~}} {{~/inline~}}`.trimStart() + }, + { + oldVersion: 24, + newVersion: 27, + old: ` +{{#*inline "sentence-furigana"}} + {{~#if definition.cloze~}} + {{~#if (hasMedia "textFurigana" definition.cloze.sentence)~}} + {{getMedia "textFurigana" definition.cloze.sentence escape=false}} + {{~else~}} + {{definition.cloze.sentence}} + {{~/if~}} + {{~/if~}} +{{/inline}} +`.trimStart(), + + expected: ` +{{#*inline "sentence-furigana"}} + {{~#if definition.cloze~}} + {{~#if (hasMedia "textFurigana" definition.cloze.sentence)~}} + {{{getMedia "textFurigana" definition.cloze.sentence escape=false}}} + {{~else~}} + {{{definition.cloze.sentence}}} + {{~/if~}} + {{~/if~}} +{{/inline}} +`.trimStart() } ]; -- cgit v1.2.3