kramdown
kramdown copied to clipboard
<figcaption markdown="1"> escapes closing tags after backticks...
Hi everyone! Thanks for developing the lovely kramdown tech. :)
I'm trying to include some kramdown within a <figcaption>
element, because nesting it within a kramdown'd <figure>
isn't sufficient:
<figure markdown="1">
~~~ cs
// some code here
~~~
<figcaption>My Caption With Inline `BackTicks`</figcaption>
</figure>
This renders as:
But if we add markdown="1"
:
<figure markdown="1">
~~~ cs
// some code here
~~~
<figcaption markdown="1">My Caption With Inline `BackTicks`</figcaption>
</figure>
...something breaks, as it doesn't seem to close off either element correctly:
Turns out it's because it's escaping the closing tags for some reason:
<figcaption>
<p>My Caption With Inline <code>BackTicks</code></figcaption>
</figure></p>
Now, I thought it might be because it's two markdown="1"
elements nested within each other, but if I use div
and span
instead of figure
and figcaption
, it works fine:
<div markdown="1">
~~~ cs
// some code here
~~~
<span markdown="1">My Caption With Inline `BackTicks`</span>
</div>
So it's specific to figcaption
.