From 76276e78dac387df66384a10bc1179c90ebd93fe Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 17 May 2021 20:18:37 -0400 Subject: 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 --- ext/data/templates/anki-field-templates-upgrade-v12.handlebars | 3 +++ ext/data/templates/default-anki-field-templates.handlebars | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 ext/data/templates/anki-field-templates-upgrade-v12.handlebars (limited to 'ext/data/templates') 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") ~}} -- cgit v1.2.3