mikitex70 / plantuml-markdown

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

Multiple images in 1 file: legal? #9

Closed charleshope closed 6 years ago

charleshope commented 6 years ago

Do you support multiple different UML blocks in the same MD file? I was not able to successfully embed two, or to successfully use two pairs of {@startuml, @enduml} in one block, either. If this is supposed to be supported, I'll add examples.

Thanks!

mikitex70 commented 6 years ago

The problem may be similar to #10. There is a bug, diagrams in single block (without an empty line inside) are not recognized correctly. As a proof try this markdown (note the blank lines):

```plantuml format="png" classes="uml myDiagram" alt="My super diagram placeholder" title="My super diagram"
Bob->Alice : hello
Bob<-Alice : hello
charleshope commented 6 years ago

Should that example work if the two blank lines are removed? It didn't; I got

 File "/Users/chope/.ghdocs/.venv/lib/python2.7/site-packages/markdown/extensions/plantuml.py", line 98, in run
    raise RuntimeError("UML block not closed")
RuntimeError: UML block not closed
Terminated: 15
charleshope commented 6 years ago

Bumping for my open question. Thanks!

mikitex70 commented 6 years ago

I've just released version 1.2.3 of the plugin, give it a try. It's tested with various versions of Python, and there is a test specific for the multiple diagrams in the same document so I hope all is fixed.