Python-Markdown/markdown

plantuml inside admonitions rendered outside

Closed this issue ยท 4 comments

I'm not sure if this is located correctly here, or would have to be at mkdocs-material ๐Ÿค”

setup:

package version
python 3.8.5
markdown 3.3.3
pymdown-extensions 8.0.1
mkdocs 1.1.2
mkdocs-material 6.1.6
plantuml-markdown 3.4.1

problem:

If I write plantuml code,
inside a code block,
inside an admonition,
the picture from plantuml-markdown get's placed below the admonition in the generated html.

example code:

!!! note
    ```plantuml
    A --> B
    ```

html output:

<div class="admonition note">
    <p class="admonition-title">Note</p>
</div>
<p><img src="data:image/svg+xml;base64,<data left out>" class="uml" alt="uml diagram" title=""></p>

desired behaviour:

The produced diagram should be inside the admonition.

html output:

<div class="admonition note">
    <p class="admonition-title">Note</p>
    <p><img src="data:image/svg+xml;base64,<data left out>" class="uml" alt="uml diagram" title=""></p>
</div>

You appear to be using both plantuml-markdown and pymdown-extensions, both of which are third party extensions. Any issues with those extensions should be reported to their respective projects.

Yup, but the admonitions are from this package, right?
If so, for this case it's one part from here (admonitions), and one from the third party extension plantuml-markdown (svg creation).

I will create another issue, on the correct repo, if I'd know who is the best recipient ๐Ÿคท

So, this third party extension takes care of codeblocks marked as holding plantuml code,
sends them to a server, receives back the rendered diagram as image
and replaces the code block with that image.
Whereas normal code blocks are showing up fine inside the admonition,
it's not the case for the image replaced code block.

If you say, this is something this third-party ext has to look after/care about in the replacement process, I'll ask there about this ๐Ÿ‘

If normal code blocks are working fine, then my first assumption is that the issue is with plantuml-markdown.

It appears this was reported upstream at mikitex70/plantuml-markdown#51. If it is determined that the issue is here, then report back and we'll reopen this.