I didn't consider that all newlines in the pre block will be printed and we thus shouldn't wrap html that has it's tags on separate lines (i.e. contains superfluous newlines) - wrapping in a div less accurately represents org-html-export but it provides the same information and gives us more freedom in the return value of HighlightCodeBlock as well as allowing us to keep the html tags on new lines (consistency).
32 lines
778 B
HTML
32 lines
778 B
HTML
<p>
|
|
Anything can be captioned.
|
|
</p>
|
|
<figure>
|
|
<div class="src src-sh">
|
|
<div class="highlight">
|
|
<pre>
|
|
echo "i have a caption!"
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<figcaption>
|
|
captioned soure block
|
|
</figcaption>
|
|
</figure>
|
|
<figure>
|
|
<img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" title="https://placekitten.com/200/200#.png" /><figcaption>
|
|
captioned link (image in this case)
|
|
</figcaption>
|
|
</figure>
|
|
<p>
|
|
note that the whole paragraph is captioned, so a linebreak is needed for images to caption correctly
|
|
</p>
|
|
<figure>
|
|
<p>
|
|
<img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" title="https://placekitten.com/200/200#.png" />
|
|
see?
|
|
</p>
|
|
<figcaption>
|
|
captioned link (image in this case)
|
|
</figcaption>
|
|
</figure>
|