I don’t really need all options of built-in figure
shortcode, but need simple as 1-2-3 images formatting and sometimes with ugly direct css style="..."
that built-in shortcode doesn’t handle. So I wrote own shortcode
<figure>
<img src="{{.Get 0}}" alt="{{.Get 1 | plainify}}"{{ with .Get 2 }} style="{{ . }}" {{ end }}>
<figcaption>{{.Get 1 | safeHTML }}</figcaption>
</figure>
<div class="debug">{{ .Get 2 }}</div>
used it in markdown publication:
{{< image "testphoto.jpg" "Test" "max-width: 400px;" >}}
and got this html
<figure>
<img src="testphoto.jpg" alt="Test" style="ZgotmplZ">
<figcaption>Test</figcaption>
</figure>
<div class="debug">max-width: 400px;</div>
Neither plainify
nor safeHTML
pipes have effect on strange css appearance. What’s wrong?