diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-05-09 12:29:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 12:29:41 -0400 |
commit | bdbe680f5cbe612df73cc0532f098f7973dfcc65 (patch) | |
tree | 27e168ad79ad6c4dcecf54c80d185faff10f32cf /ext/bg/data | |
parent | 9900291b073bb2b6495cae0993138c26970815a3 (diff) |
Omit the sound tag if it's empty (#525)
Diffstat (limited to 'ext/bg/data')
-rw-r--r-- | ext/bg/data/default-anki-field-templates.handlebars | 8 |
1 files changed, 5 insertions, 3 deletions
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~}} |