mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
192 stars 55 forks source link

plantuml inside admonitions rendered outside #51

Closed 9Lukas5 closed 3 years ago

9Lukas5 commented 3 years ago

Hey,

I've a problem using plantuml-renders inside of admonitions from python-markdown. I asked in the python-markdown repo yet, but as it's only happening with the plantuml renders, they suspect it's up to this extension.

setup:

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

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.

Normal code blocks are working fine, but the as plantuml marked ones replaced by the render not.

example code:

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

html output:  
```html
<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>
9Lukas5 commented 3 years ago

thanks for doing this so fast @mikitex70 I can confirm it's working now for me :smile: