Hi, I created a shortcode to add captioned tables. When I use md tables, they show up OK, but when I use HTML directly, nothing shows up.
There are no errors, even with --verbose
, there is simply nothing between the figure and figcaption tags.
Here is the shortcode:
<figure>
{{ .Inner | markdownify}}
<figcaption><p>{{ .Get "caption" | markdownify}}</p></figcaption>
</figure>
Which works like so,
{{<table caption="Ensemble times with a Bias of 5.">}}
Ensemble Size | 10 |5 |1 |
-|-|-|-|
Time (s) |85.94 |86.01 |87.80 |
{{</table>}}
But not with,
{{<table caption="Ensemble times with a Bias of 5.">}}
<table>
<thead>
<tr>
<th>Ensemble Size</th>
<th>10</th>
<th>5</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>Time (s)</td>
<td>85.94</td>
<td>86.01</td>
<td>87.80</td>
</tr>
</tbody>
</table>
{{</table>}}
The latter is rendered as,
<figure>
<figcaption><p>Ensemble times with a Bias of 5.</p></figcaption>
</figure>
I thought HTML could be included directly in Markdown, so don’t see why this wouldn’t work?
I’ve tried to add a <div>
tag as suggested