Is it possible to parse <table>
(and <td>
, etc.) tag content to render Admonitions, Tabs, etc. in it?
#2333
-
Hi 😀! I was trying to make advanced table that looks like pytest table: For example, I have a table like this (with all <table filteridx="0" unsortable markdown>
<thead>
<tr class="header">
<th>COL1</th>
<th>COL2</th>
<th>COL3</th>
<th>COL4</th>
</tr>
</thead>
<!-- My first multi-row table row -->
<tbody markdown>
<tr onclick="toggleDisplayFor('LINE1')">
<td style="color:black; background-color:#9cf3d5">VAL A1</td>
<td>VAL A2</td>
<td>VAL A3</td>
<td>VAL A4</td>
</tr>
<tr id="LINE1" hidden markdown>
<td class="log" fullrow markdown>
=== "Tab"
Tab content ...
!!!info "Admonition"
Admo. content ...
</td>
</tr>
</tbody>
<!-- Another multi-row table row... -->
<tbody>
... etc ...
</tbody>
</table> For comprehension (without markdown), my table look like this (when all multirows are opened/visible):
My problem is that Admonitions, Tabs, etc. are not rendered inside a table. Thanks in advance 😊! Note: More precisely, I include the content of another file with the EDIT 1: Without writing plain HTML for them, it can become hard for Tabs for example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I finally got around to looking at this. |
Beta Was this translation helpful? Give feedback.
I finally got around to looking at this.
<td>
are handled as inline by default, so you have to instruct them to be handled asblock
if you'd like them to handle block content. This is done viamarkdown="block"
.