diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-09 20:14:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 20:14:05 -0400 |
commit | 7a1570885e7310e5b1e15ab798c9eb66694a96fb (patch) | |
tree | b44ee8498a55a0ab3866e0bd67600283d6fbae29 /ext/data/templates | |
parent | 22f048e527552cf0451ea03e0e9bd869b6ad240b (diff) |
Simplify get media structure (#1817)
* Remove format argument of getMedia
* Implement escaping
Diffstat (limited to 'ext/data/templates')
-rw-r--r-- | ext/data/templates/anki-field-templates-upgrade-v13.handlebars | 12 | ||||
-rw-r--r-- | ext/data/templates/default-anki-field-templates.handlebars | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/ext/data/templates/anki-field-templates-upgrade-v13.handlebars b/ext/data/templates/anki-field-templates-upgrade-v13.handlebars index 25007030..b3e0f1b9 100644 --- a/ext/data/templates/anki-field-templates-upgrade-v13.handlebars +++ b/ext/data/templates/anki-field-templates-upgrade-v13.handlebars @@ -1,11 +1,11 @@ {{#*inline "selection-text"}} - {{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText" format="text"}}{{/getMedia}}{{/if~}} + {{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText"}}{{/getMedia}}{{/if~}} {{/inline}} {{#*inline "sentence-furigana"}} {{~#if definition.cloze~}} {{~#if (hasMedia "textFurigana" definition.cloze.sentence)~}} - {{#getMedia "textFurigana" definition.cloze.sentence format="html"}}{{/getMedia}} + {{#getMedia "textFurigana" definition.cloze.sentence escape=false}}{{/getMedia}} {{~else~}} {{definition.cloze.sentence}} {{~/if~}} @@ -36,7 +36,7 @@ {{~/if~}} {{=======}} {{~#if (hasMedia "audio")~}} - [sound:{{#getMedia "audio" format="fileName"}}{{/getMedia}}] + [sound:{{#getMedia "audio"}}{{/getMedia}}] {{~/if~}} {{>>>>>>>}} @@ -44,7 +44,7 @@ <img src="{{definition.screenshotFileName}}" /> {{=======}} {{~#if (hasMedia "screenshot")~}} - <img src="{{#getMedia "screenshot" format="fileName"}}{{/getMedia}}" /> + <img src="{{#getMedia "screenshot"}}{{/getMedia}}" /> {{~/if~}} {{>>>>>>>}} @@ -54,12 +54,12 @@ {{~/if~}} {{=======}} {{~#if (hasMedia "clipboardImage")~}} - <img src="{{#getMedia "clipboardImage" format="fileName"}}{{/getMedia}}" /> + <img src="{{#getMedia "clipboardImage"}}{{/getMedia}}" /> {{~/if~}} {{>>>>>>>}} {{<<<<<<<}} {{~#if definition.clipboardText~}}{{definition.clipboardText}}{{~/if~}} {{=======}} -{{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}} +{{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText"}}{{/getMedia}}{{/if~}} {{>>>>>>>}} diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars index cdbec87d..92f9c6b7 100644 --- a/ext/data/templates/default-anki-field-templates.handlebars +++ b/ext/data/templates/default-anki-field-templates.handlebars @@ -32,7 +32,7 @@ {{#*inline "audio"}} {{~#if (hasMedia "audio")~}} - [sound:{{#getMedia "audio" format="fileName"}}{{/getMedia}}] + [sound:{{#getMedia "audio"}}{{/getMedia}}] {{~/if~}} {{/inline}} @@ -174,7 +174,7 @@ {{#*inline "screenshot"}} {{~#if (hasMedia "screenshot")~}} - <img src="{{#getMedia "screenshot" format="fileName"}}{{/getMedia}}" /> + <img src="{{#getMedia "screenshot"}}{{/getMedia}}" /> {{~/if~}} {{/inline}} @@ -294,12 +294,12 @@ {{#*inline "clipboard-image"}} {{~#if (hasMedia "clipboardImage")~}} - <img src="{{#getMedia "clipboardImage" format="fileName"}}{{/getMedia}}" /> + <img src="{{#getMedia "clipboardImage"}}{{/getMedia}}" /> {{~/if~}} {{/inline}} {{#*inline "clipboard-text"}} - {{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText" format="text"}}{{/getMedia}}{{/if~}} + {{~#if (hasMedia "clipboardText")}}{{#getMedia "clipboardText"}}{{/getMedia}}{{/if~}} {{/inline}} {{#*inline "conjugation"}} @@ -379,13 +379,13 @@ {{/inline}} {{#*inline "selection-text"}} - {{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText" format="text"}}{{/getMedia}}{{/if~}} + {{~#if (hasMedia "selectionText")}}{{#getMedia "selectionText"}}{{/getMedia}}{{/if~}} {{/inline}} {{#*inline "sentence-furigana"}} {{~#if definition.cloze~}} {{~#if (hasMedia "textFurigana" definition.cloze.sentence)~}} - {{#getMedia "textFurigana" definition.cloze.sentence format="html"}}{{/getMedia}} + {{#getMedia "textFurigana" definition.cloze.sentence escape=false}}{{/getMedia}} {{~else~}} {{definition.cloze.sentence}} {{~/if~}} |