summaryrefslogtreecommitdiff
path: root/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-16 15:29:42 -0500
committerGitHub <noreply@github.com>2021-01-16 15:29:42 -0500
commitb2342945403c27e346446bbe316f075ed2b13eff (patch)
tree690a065de66ece5e0b395dbc2811d3d9fdbe13f9 /ext/bg/data/anki-field-templates-upgrade-v8.handlebars
parent0ac35771192adb87d76809aff171d60a5d0018c3 (diff)
Stroke count marker (#1251)
* Add stroke-count definition * Update options * Update documentation * Add helper
Diffstat (limited to 'ext/bg/data/anki-field-templates-upgrade-v8.handlebars')
-rw-r--r--ext/bg/data/anki-field-templates-upgrade-v8.handlebars14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/bg/data/anki-field-templates-upgrade-v8.handlebars b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
new file mode 100644
index 00000000..a5056364
--- /dev/null
+++ b/ext/bg/data/anki-field-templates-upgrade-v8.handlebars
@@ -0,0 +1,14 @@
+{{#*inline "stroke-count"}}
+ {{~#scope~}}
+ {{~#set "found" false}}{{/set~}}
+ {{~#each definition.stats.misc~}}
+ {{~#if (op "===" name "strokes")~}}
+ {{~#set "found" true}}{{/set~}}
+ Stroke count: {{value}}
+ {{~/if~}}
+ {{~/each~}}
+ {{~#if (op "!" (get "found"))~}}
+ Stroke count: Unknown
+ {{~/if~}}
+ {{~/scope~}}
+{{/inline}}