From 98548e69f9c4d3093df9cb81de6c696f367efccc Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 5 Feb 2023 20:38:18 -0800 Subject: [PATCH] Omit div with no attrs --- layouts/partials/paige/figure.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/layouts/partials/paige/figure.html b/layouts/partials/paige/figure.html index f71eaa8c..6b7fd748 100644 --- a/layouts/partials/paige/figure.html +++ b/layouts/partials/paige/figure.html @@ -67,16 +67,20 @@ {{ end }}
-
- {{ if $table }} -
- {{ end }} -
{{ $content }}
- {{ if $showcaption }} -
{{ $caption }}
- {{ end }} - {{ if $table }} -
- {{ end }} -
+ {{ if or $heightish $widthish (and (not $float) $style) }} +
+ {{ end }} + {{ if $table }} +
+ {{ end }} +
{{ $content }}
+ {{ if $showcaption }} +
{{ $caption }}
+ {{ end }} + {{ if $table }} +
+ {{ end }} + {{ if or $heightish $widthish (and (not $float) $style) }} +
+ {{ end }}