summaryrefslogtreecommitdiff
path: root/ext/data/templates/anki-field-templates-upgrade-v21.handlebars
blob: 2fa0f0aa3902fc3497867ab4c578306a19893ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{{<<<<<<<}}
{{~#set "any" false}}{{/set~}}
{{=======}}
{{~set "any" false~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "any" true}}{{/set~}}
{{=======}}
{{~set "any" true~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{/each}}
{{=======}}
{{#each glossary}}{{formatGlossary ../dictionary .}}{{/each}}
{{>>>>>>>}}

{{<<<<<<<}}
{{#each glossary}}{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}{{#unless @last}} | {{/unless}}{{/each}}
{{=======}}
{{#each glossary}}{{formatGlossary ../dictionary .}}{{#unless @last}} | {{/unless}}{{/each}}
{{>>>>>>>}}

{{<<<<<<<}}
<ul>{{#each glossary}}<li>{{#formatGlossary ../dictionary}}{{{.}}}{{/formatGlossary}}</li>{{/each}}</ul>
{{=======}}
<ul>{{#each glossary}}<li>{{formatGlossary ../dictionary .}}</li>{{/each}}</ul>
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "previousDictionary" dictionary~}}{{~/set~}}
{{=======}}
{{~set "previousDictionary" dictionary~}}
{{>>>>>>>}}

{{<<<<<<<}}
<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~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "exclusive" (spread exclusiveExpressions exclusiveReadings)}}{{/set~}}
{{=======}}
{{~set "exclusive" (spread exclusiveExpressions exclusiveReadings)~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "separator" ""~}}{{/set~}}
{{=======}}
{{~set "separator" ""~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#get "separator"}}{{/get~}}{{{.}}}
{{=======}}
{{~get "separator"~}}{{{.}}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "found" false}}{{/set~}}
{{=======}}
{{~set "found" false~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "found" true}}{{/set~}}
{{=======}}
{{~set "found" true~}}
{{>>>>>>>}}

{{<<<<<<<}}
{{~#set "first" true}}{{/set~}}
{{=======}}
{{~set "first" true~}}
{{>>>>>>>}}

{{<<<<<<<}}
                        {{~#set (concat "used_" .) true~}}{{~/set~}}
                        {{~#set "first" false~}}{{~/set~}}
{{=======}}
                        {{~set (concat "used_" .) true~}}
                        {{~set "first" false~}}
{{>>>>>>>}}