aboutsummaryrefslogtreecommitdiff
path: root/ext/data
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-17 20:18:37 -0400
committerGitHub <noreply@github.com>2021-05-17 20:18:37 -0400
commit76276e78dac387df66384a10bc1179c90ebd93fe (patch)
treeba11d7bf4375aa76ae45646b45953df9e71f1d78 /ext/data
parent12451eaf61281e588fb8ef5f911d604ba34aca92 (diff)
Expose search query to anki template renderer (#1686)
* Expose query and fullQuery to Anki context * Add {search-query} marker * Update test data * Update tests * Wrap search query in multiLine
Diffstat (limited to 'ext/data')
-rw-r--r--ext/data/templates/anki-field-templates-upgrade-v12.handlebars3
-rw-r--r--ext/data/templates/default-anki-field-templates.handlebars4
2 files changed, 7 insertions, 0 deletions
diff --git a/ext/data/templates/anki-field-templates-upgrade-v12.handlebars b/ext/data/templates/anki-field-templates-upgrade-v12.handlebars
new file mode 100644
index 00000000..9fe3c9d0
--- /dev/null
+++ b/ext/data/templates/anki-field-templates-upgrade-v12.handlebars
@@ -0,0 +1,3 @@
+{{#*inline "search-query"}}
+ {{~#multiLine}}{{context.fullQuery}}{{/multiLine~}}
+{{/inline}}
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index ec57a826..97359aa0 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -372,4 +372,8 @@
{{~/scope~}}
{{/inline}}
+{{#*inline "search-query"}}
+ {{~#multiLine}}{{context.fullQuery}}{{/multiLine~}}
+{{/inline}}
+
{{~> (lookup . "marker") ~}}