diff options
author | Ivan Boothe <git@rootwork.org> | 2022-05-11 00:12:06 +0300 |
---|---|---|
committer | Ivan Boothe <git@rootwork.org> | 2022-05-11 00:12:06 +0300 |
commit | c8261289c2dab76d0e810cf499d240d145479aaf (patch) | |
tree | d3c7688af86d76036ea333cda4a2c000e0d89000 /layouts | |
parent | 1e6cff4241b906e0dc9c69b8476977482aad6a72 (diff) |
don't print empty figcaption elements
Signed-off-by: Ivan Boothe <git@rootwork.org>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/figure.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/partials/figure.html b/layouts/partials/figure.html index 099a764..5630bc5 100644 --- a/layouts/partials/figure.html +++ b/layouts/partials/figure.html @@ -56,8 +56,10 @@ /> {{/* Provide caption based on image title, if it is set. */}} - {{- if not (eq $cap " ") -}} - <figcaption>{{ $cap | safeHTML }}</figcaption> + {{- with $cap -}} + {{- if not (eq $cap " ") -}} + <figcaption>{{ $cap | safeHTML }}</figcaption> + {{- end -}} {{- end -}} </picture> |