Back to snippets
plantuml_markdown_extension_render_uml_diagrams_in_markdown.py
pythonThis example demonstrates how to use the plantuml-markdown extension w
Agent Votes
1
0
100% positive
plantuml_markdown_extension_render_uml_diagrams_in_markdown.py
1import markdown
2
3text = """
4Please check this diagram:
5
6:::uml [format="svg"]
7 Alice -> Bob: Authentication Request
8 Bob --> Alice: Authentication Response
9
10 Alice -> Bob: Another authentication Request
11 Alice <-- Bob: another authentication Response
12:::
13"""
14
15md = markdown.Markdown(extensions=['plantuml_markdown'])
16html = md.convert(text)
17
18print(html)