|
@@ -55,6 +55,23 @@ def markdown_tables():
|
|
|
''', extras=['tables'])
|
|
|
|
|
|
|
|
|
+@doc.demo('Mermaid diagrams', '''
|
|
|
+ You can use Mermaid diagrams with the "mermaid" extra.
|
|
|
+ See the [markdown2 documentation](https://github.com/trentm/python-markdown2/wiki/Extras#implemented-extras)
|
|
|
+ for a list of available extras.
|
|
|
+''')
|
|
|
+def mermaid():
|
|
|
+ ui.markdown('''
|
|
|
+ ```mermaid
|
|
|
+ graph TD;
|
|
|
+ A-->B;
|
|
|
+ A-->C;
|
|
|
+ B-->D;
|
|
|
+ C-->D;
|
|
|
+ ```
|
|
|
+ ''', extras=['mermaid'])
|
|
|
+
|
|
|
+
|
|
|
@doc.demo('LaTeX formulas', '''
|
|
|
By activating the "latex" extra, you can use LaTeX formulas.
|
|
|
This requires markdown2 version >=2.5 as well as latex2mathml to be installed.
|