-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Implementation PR
No response
Reference Issues
No response
Summary
Hi, thank you for a neat little project!
At my work, we'd like to implement a few larger diagrams, and it's hard to format them in the single {% mermaid "" %} template tag. I propose a second, block template tag, and am happy to implement it if you think it's worth doing.
I would keep support for specifying theme
and version
, and I'd update the existing tests to test them with both versions of the tag. The resulting output should be identical, apart from maybe whitespace differences.
What do you think?
Basic Example
{% startmermaid %}
graph TD
A[Enter Chart Definition] --> B(Preview)
B --> C{decide}
C --> D[Keep]
C --> E[Edit Definition]
E --> B
D --> F[Save Image and Code]
F --> B
{% endmermaid %}
Drawbacks
- block template tag code is more complex than simple tags
Unresolved questions
- How would we call the new template tags?
startmermaid/endmermaid
?mermaid_block/endmermaid_block
?diagram/enddiagram
? Or would we try to be clever and support both versions with a singlemermaid
tag?
ArtyomVancyan
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested