Skip to content

Commit

Permalink
chore: metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 12, 2023
1 parent abe76c6 commit 0ccf45b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions mknodes/basenodes/mkdiagram/metadata.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,26 @@ jinja = """

[output.markdown]
template = """
{{ node.fence_boundary }} {{ node.fence_title }}
{{ node.text }}
{{ node.fence_boundary }} mermaid
{{ node.graph_type }} {{ node.direction }}
{% if node.connections %}
{% for name in node.names %}
{{ name }}
{% endfor %}
{% for connection in node.connections %}
{% if connection | length == 2 %}
{{ connection[0] }} --> {{ connection[1] }}
{% else %}
{{ connection[0] }} --> |{{ connection[2] }}| {{ connection[1] }}
{% endif %}
{% endfor %}
{% else %}
{% for name in node.names %}
{{ name | get_hash }}["{{ name }}"]
{% endfor %}
{% for prev, nxt in node.names | pairwise %}
{{ prev | get_hash }} --> {{ nxt | get_hash }}
{% endfor %}
{% endif %}
{{ node.fence_boundary }}
"""

0 comments on commit 0ccf45b

Please sign in to comment.