sphinx-contrib / plantuml

BSD 2-Clause "Simplified" License
113 stars 40 forks source link

Add alias for `plantuml` directive #88

Closed stephanlachnit closed 4 months ago

stephanlachnit commented 4 months ago

Currently, only the uml directive is supported. It would be nice if plantuml as a alias to the uml directive could be added.

The main argument for this is support for PlantUML rendering with GitLab in Markdown. It supports PlantUML via:

```plantuml
Bob -> Alice : hello
Alice -> Bob : hi

If you use [MyST](https://myst-parser.readthedocs.io) to use Markdown with sphinx, PlantUML via `sphinxcontrib.plantuml` only works with a `{uml}` code fence:

````markdown
```{uml}
Bob -> Alice : hello
Alice -> Bob : hi
This is unfortunate because this means you can't use the same file to render both with GitLab and sphinx.

However, if the `plantuml` directive would be supported, one could set
```python
myst_fence_as_directive = ["plantuml"]

in the sphinx config to support the default GitLab rendering.