mikitex70 / plantuml-markdown

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

Rename attribute `classes` to `class` #16

Closed soblom closed 5 years ago

soblom commented 5 years ago

First of all, thanks for the great plug-in. It makes using plantuml in my documenation workflow (using MkDocs) such a joy!

When I tried to style the generated UML diagram <img> a little bit, I noticed, that the plug-in creates an element attribute called classes if I specify classes in the plantuml code block.

```plantuml format="svg" classes="myClass"
class MyClass
...

generates

<img alt="uml diagram" classes="myClass" src="..."

when the attribute should be named class instead. As a result, my browser doesn't pick up that I wanted this element to be of the class myClass and doesn't apply the styles I defined for it.

Fixing the output will lead to correct behaviour in terms of HTML and browsers. The other question is, if the input parameter, i.e. ```plantuml classes=... should be adapted too. The plural reads more natural, but since its sole purpose is specify an HTML attribute of the name class, my personal preference would be to name the input parameter class as well.

mikitex70 commented 5 years ago

Sorry for the stupid mistake. Maybe I've introduced this error during the refactor for the tests. Now is fixed in version 1.2.6, available through pip.

soblom commented 5 years ago

👍 Thanks for the quick response.