I’m trying to use the include
tag inside a Markdown table. However, Jekyll fails to create the table.
In my case, I have a video.html
template that wraps around <video>
and <figcaption>
in <figure>
. Here’s the template’s source:
<figure>
<video src="{{ include.url }}"
controls="controls"
alt="{{ include.alt }}"
title="{{ include.caption }}"
>{{ include.alt }}</video>
<figcaption>{{ include.caption }}</figcaption>
</figure>
If I type the following:
{% include video.html url="https://theevilskeleton.fedorapeople.org/Articles/explaining-flatpaks-permission-systems/FileTransfer%20and%20FileChooser%20Portals.webm"
caption="Selecting files by dragging and dropping, and by using the file picker."
alt="In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app." %}
Then Jekyll generates the following HTML:
<figure>
<video src="https://theevilskeleton.fedorapeople.org/Articles/explaining-flatpaks-permission-systems/FileTransfer%20and%20FileChooser%20Portals.webm" controls="controls" alt="In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app." title="Selecting files by dragging and dropping, and by using the file picker.">In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app.</video>
<figcaption>Selecting files by dragging and dropping, and by using the file picker.</figcaption>
</figure>
Which is intended.
However, when I use it inside a table using Markdown, e.g.
| t | t |
|---|---|
| {% include video.html url="https://theevilskeleton.fedorapeople.org/Articles/explaining-flatpaks-permission-systems/FileTransfer%20and%20FileChooser%20Portals.webm" caption="Selecting files by dragging and dropping, and by using the file picker." alt="In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app." %} | t |
It generates the following HTML:
<p>| t | t |
|—|—|
| <figure></figure></p>
<video src="https://theevilskeleton.fedorapeople.org/Articles/explaining-flatpaks-permission-systems/FileTransfer%20and%20FileChooser%20Portals.webm" controls="controls" alt="In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app." title="Selecting files by dragging and dropping, and by using the file picker.">In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app.</video>
<figcaption>Selecting files by dragging and dropping, and by using the file picker.</figcaption>
<p></figure>
| t |</p>
Which is unintended; it’s not a table. Instead, it should be generating the following:
<table>
<thead>
<tr>
<th>t</th>
<th>t</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<figure>
<video src="https://theevilskeleton.fedorapeople.org/Articles/explaining-flatpaks-permission-systems/FileTransfer%20and%20FileChooser%20Portals.webm" controls="controls" alt="In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app." title="Selecting files by dragging and dropping, and by using the file picker.">In a file manager, in the '/var/home/TheEvilSkeleton/Pictures/Upscaler' directory, I grab an image named 'test.png' and drop it into an app called Upscaler. Upscaler returns '/run/user/1000/doc/98b40428/test.png' in the logs and imports the image into the app. Then, using the file picker, I open a file 'test2.jpg'. Upscaler returns '/run/user/1000/doc/92c6053f/test2.jpg' and shows the image in the app.</video>
<figcaption>Selecting files by dragging and dropping, and by using the file picker.</figcaption>
</figure>
</td>
<td>t</td>
</tr>
</tbody>
</table>
(Which is a table)
Am I doing something wrong? Ideally, I’d want to put videos and images inside (preferably) Markdown tables.
Thank you!