From bdbe680f5cbe612df73cc0532f098f7973dfcc65 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 9 May 2020 12:29:41 -0400 Subject: Omit the sound tag if it's empty (#525) --- ext/bg/data/default-anki-field-templates.handlebars | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/bg/data/default-anki-field-templates.handlebars') diff --git a/ext/bg/data/default-anki-field-templates.handlebars b/ext/bg/data/default-anki-field-templates.handlebars index 77818a43..4382f707 100644 --- a/ext/bg/data/default-anki-field-templates.handlebars +++ b/ext/bg/data/default-anki-field-templates.handlebars @@ -14,9 +14,11 @@ {{~/if~}} {{/inline}} -{{#*inline "audio"~}} - [sound:{{definition.audioFileName}}] -{{~/inline}} +{{#*inline "audio"}} + {{~#if definition.audioFileName~}} + [sound:{{definition.audioFileName}}] + {{~/if~}} +{{/inline}} {{#*inline "character"}} {{~definition.character~}} -- cgit v1.2.3