Fix closing tag of figures without captions in lists (#2697)
Fix closing tag of figures without captions in lists (#2697)

When the figure helper is used in a list, which can be either ordered or
unordered, and no caption is specified, a line with text "</figure>"
will be shown below the figure on the rendered page.

This is because, if the '{% if include.caption %}' evaluates to false,
the lines between that 'if' statement and '{% endif %}' will be emptied,
not removed, so the block will be filled by empty lines.

HTML ignores redundant empty lines, but Markdown takes them seriously.
In addition, Markdown expects proper indentation of lines inside lists,
and the closing '</figure>' tag is not indented.  When combined, the
empty space and absence of indentation cause Markdown to process the
'</figure>' tag as a separate paragraph instead of an HTML tag, thus the
text for the tag is directly rendered on the page.

The fix for this issue is very simple: remove the empty space when
'include.caption' is false.  As described in
<https://shopify.github.io/liquid/basics/whitespace/>, this can be done
by adding hyphens to the 'if' and 'endif' tags.
kamilszymanski/kamilszymanski.github.io,sorrel/minimal-mistakes,jijames/dfir.science,hoch1009/hoch1009.github.io,dispersing/dispersing.github.io,tehrlich/tehrlich.github.io,nithinvenugopal/nithinvenugopal.github.io,tjmahr/tjmahr.github.io,luisDVA/luisdva.github.io,luisDVA/luisdva.github.io,kaitokikuchi/kaitokikuchi.github.io,cmbosma/cmbosma.github.io,agakshat/agakshat.github.io,dispersing/dispersing.github.io,mmistakes/minimal-mistakes,keelezibel/keelezibel.github.io,akashmjn/akashmjn.github.io,kaitokikuchi/kaitokikuchi.github.io,bighi/bighi.github.io,Dhvanan/Dhvanan.github.io,bum752/bum752.github.io,keelezibel/keelezibel.github.io,kaitokikuchi/kaitokikuchi.github.io,XIAOYixuan/XIAOYixuan.github.io,alexstyl/alexstyl.github.io,XIAOYixuan/XIAOYixuan.github.io,agakshat/agakshat.github.io,alexstyl/alexstyl.github.io,bps90/bps90.github.io,objectprogr/objectprogr.github.io,LoveMeWithoutAll/lovemewithoutall.github.io,nithinvenugopal/nithinvenugopal.github.io,Dhvanan/Dhvanan.github.io,luisDVA/luisdva.github.io,kanaloa/kanaloa.github.io,chrismacp/chrismacp.github.io,nithinvenugopal/nithinvenugopal.github.io,vtrnnhlinh/vtrnnhlinh.github.io,yukongis/yukongis.github.io,LoveMeWithoutAll/lovemewithoutall.github.io,juanlu-sanz/juanlu-sanz.github.io,Dhvanan/Dhvanan.github.io,juanlu-sanz/juanlu-sanz.github.io,chrismacp/chrismacp.github.io,LoveMeWithoutAll/lovemewithoutall.github.io,kanaloa/kanaloa.github.io,hoch1009/hoch1009.github.io,RyanMilstead1/website,objectprogr/objectprogr.github.io,jijames/dfir.science,cmbosma/cmbosma.github.io,aisouard/aisouard.github.io,sorrel/minimal-mistakes,dispersing/dispersing.github.io,kamilszymanski/kamilszymanski.github.io,mohamed-barakat/mohamed-barakat.github.io,tjmahr/tjmahr.github.io,aisouard/aisouard.github.io,vtrnnhlinh/vtrnnhlinh.github.io,akashmjn/akashmjn.github.io,bum752/bum752.github.io,yukongis/yukongis.github.io,bighi/bighi.github.io,juanlu-sanz/juanlu-sanz.github.io,lucasnetau/lucasnetau.github.io,vtrnnhlinh/vtrnnhlinh.github.io,mmistakes/minimal-mistakes,alexstyl/alexstyl.github.io,tjmahr/tjmahr.github.io,agakshat/agakshat.github.io,jijames/dfir.science,bps90/bps90.github.io,lucasnetau/lucasnetau.github.io,chrismacp/chrismacp.github.io,chrismacp/chrismacp.github.io,juanlu-sanz/juanlu-sanz.github.io,RyanMilstead1/website,akashmjn/akashmjn.github.io,RyanMilstead1/website,tehrlich/tehrlich.github.io,dispersing/dispersing.github.io,bps90/bps90.github.io,tehrlich/tehrlich.github.io,sorrel/minimal-mistakes,yukongis/yukongis.github.io,luisDVA/luisdva.github.io,tjmahr/tjmahr.github.io,jijames/dfir.science,hoch1009/hoch1009.github.io,bps90/bps90.github.io,keelezibel/keelezibel.github.io,XIAOYixuan/XIAOYixuan.github.io,objectprogr/objectprogr.github.io,aisouard/aisouard.github.io,bum752/bum752.github.io,cmbosma/cmbosma.github.io,kamilszymanski/kamilszymanski.github.io,mmistakes/minimal-mistakes,tjmahr/tjmahr.github.io,lucasnetau/lucasnetau.github.io,bighi/bighi.github.io