aboutsummaryrefslogtreecommitdiff
path: root/ext/data
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-10-17 21:41:45 +0100
committerpraschke <stel@comfy.monster>2023-10-17 21:41:45 +0100
commitae91e2442d7b3746c633871ff956a8addd7046b5 (patch)
treef10a4b5af7cec8eff3ee6e5946779f315da6df00 /ext/data
parent9a78edaee74a8355d49ec930c82e118518d5d625 (diff)
fix: furigana and furiganaPlain
Diffstat (limited to 'ext/data')
-rw-r--r--ext/data/templates/anki-field-templates-upgrade-v21.handlebars30
-rw-r--r--ext/data/templates/default-anki-field-templates.handlebars10
2 files changed, 35 insertions, 5 deletions
diff --git a/ext/data/templates/anki-field-templates-upgrade-v21.handlebars b/ext/data/templates/anki-field-templates-upgrade-v21.handlebars
index e69de29b..92034995 100644
--- a/ext/data/templates/anki-field-templates-upgrade-v21.handlebars
+++ b/ext/data/templates/anki-field-templates-upgrade-v21.handlebars
@@ -0,0 +1,30 @@
+
+{{<<<<<<<}}
+<span class="expression-{{termFrequency}}">{{~#furigana}}{{{.}}}{{/furigana~}}</span>
+{{=======}}
+<span class="expression-{{termFrequency}}">{{~furigana .~}}</span>
+{{>>>>>>>}}
+
+{{<<<<<<<}}
+{{#furigana}}{{{definition}}}{{/furigana}}
+{{=======}}
+{{furigana definition}}
+{{>>>>>>>}}
+
+{{<<<<<<<}}
+<span class="expression-{{termFrequency}}">{{~#furiganaPlain}}{{{.}}}{{/furiganaPlain~}}</span>
+{{=======}}
+<span class="expression-{{termFrequency}}">{{~furiganaPlain .~}}</span>
+{{>>>>>>>}}
+
+{{<<<<<<<}}
+{{#furiganaPlain}}{{{definition}}}{{/furiganaPlain}}
+{{=======}}
+{{furiganaPlain definition}}
+{{>>>>>>>}}
+
+{{<<<<<<<}}
+{{~#furigana expression reading~}}{{~/furigana~}}
+{{=======}}
+{{~furigana expression reading~}}
+{{>>>>>>>}}
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index 31d5d13f..751236f4 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -78,22 +78,22 @@
{{#*inline "furigana"}}
{{~#if merge~}}
{{~#each definition.expressions~}}
- <span class="expression-{{termFrequency}}">{{~#furigana}}{{{.}}}{{/furigana~}}</span>
+ <span class="expression-{{termFrequency}}">{{~furigana .~}}</span>
{{~#unless @last}}、{{/unless~}}
{{~/each~}}
{{~else~}}
- {{#furigana}}{{{definition}}}{{/furigana}}
+ {{furigana definition}}
{{~/if~}}
{{/inline}}
{{#*inline "furigana-plain"}}
{{~#if merge~}}
{{~#each definition.expressions~}}
- <span class="expression-{{termFrequency}}">{{~#furiganaPlain}}{{{.}}}{{/furiganaPlain~}}</span>
+ <span class="expression-{{termFrequency}}">{{~furiganaPlain .~}}</span>
{{~#unless @last}}、{{/unless~}}
{{~/each~}}
{{~else~}}
- {{#furiganaPlain}}{{{definition}}}{{/furiganaPlain}}
+ {{furiganaPlain definition}}
{{~/if~}}
{{/inline}}
@@ -255,7 +255,7 @@
<li>
{{~#if (op "!==" ../definition.type "kanji")~}}
{{~#if (op "||" (op ">" ../uniqueExpressions.length 1) (op ">" ../uniqueReadings.length 1))~}}(
- {{~#furigana expression reading~}}{{~/furigana~}}
+ {{~furigana expression reading~}}
) {{/if~}}
{{~/if~}}
{{~dictionary}}: {{frequency~}}