aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/data/anki-field-templates-upgrade-v8.handlebars')
-rw-r--r--ext/bg/data/anki-field-templates-upgrade-v8.handlebars18
1 files changed, 15 insertions, 3 deletions
diff --git a/ext/bg/data/anki-field-templates-upgrade-v8.handlebars b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
index 32c61343..b3aed45f 100644
--- a/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
+++ b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
@@ -52,6 +52,13 @@
{{~#set "any" true}}{{/set~}}
{{~/if~}}
{{~/each~}}
+ {{~#unless noDictionaryTag~}}
+ {{~#if (op "||" (op "!" @root.compactTags) (op "!==" dictionary (get "previousDictionary")))~}}
+ {{~#if (get "any")}}, {{else}}<i>({{/if~}}
+ {{dictionary}}
+ {{~#set "any" true}}{{/set~}}
+ {{~/if~}}
+ {{~/unless~}}
{{~#if (get "any")}})</i> {{/if~}}
{{~/scope~}}
{{~#if only~}}({{#each only}}{{.}}{{#unless @last}}, {{/unless}}{{/each}} only) {{/if~}}
@@ -63,6 +70,7 @@
{{~else~}}
<ul>{{#each glossary}}<li>{{#multiLine}}{{.}}{{/multiLine}}</li>{{/each}}</ul>
{{~/if~}}
+ {{~#set "previousDictionary" dictionary~}}{{~/set~}}
{{/inline}}
{{>>>>>>>}}
@@ -99,12 +107,12 @@
<div style="text-align: left;">
{{~#scope~}}
{{~#if (op "===" definition.type "term")~}}
- {{~> glossary-single definition brief=brief ~}}
+ {{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}}
{{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}}
{{~#if (op ">" definition.definitions.length 1)~}}
- <ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief ~}}</li>{{~/each~}}</ol>
+ <ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}</li>{{~/each~}}</ol>
{{~else~}}
- {{~#each definition.definitions~}}{{~> glossary-single . brief=../brief ~}}{{~/each~}}
+ {{~#each definition.definitions~}}{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}{{~/each~}}
{{~/if~}}
{{~else if (op "===" definition.type "kanji")~}}
{{~#if (op ">" definition.glossary.length 1)~}}
@@ -116,4 +124,8 @@
{{~/scope~}}
</div>
{{~/inline~}}
+
+{{#*inline "glossary-no-dictionary"}}
+ {{~> glossary noDictionaryTag=true ~}}
+{{/inline}}
{{>>>>>>>}}