-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support mermaid diagrams with frontmatter directives #52
fix: support mermaid diagrams with frontmatter directives #52
Conversation
@@ -15,7 +15,7 @@ | |||
*/ | |||
|
|||
const mermaidStart = | |||
/^(\s*)(graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|journey|gantt|pie|requirementDiagram|gitGraph|C4Context|C4Container|C4Component|C4Dynamic|C4Deployment|timeline)/; | |||
/^(\s*)(graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|journey|gantt|pie|requirementDiagram|gitGraph|C4Context|C4Container|C4Component|C4Dynamic|C4Deployment|timeline)/gm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test here https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid/blob/main/src/Mermaid/hooks.test.ts to ensure we don't regress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This fixes #46 as well. Do you want me to add a test for this as well?
|
I think it can't hurt as those quickly running unit tests. Thank you 🙇 |
Anything else I can do to get this merged? 🤔 |
Thanks for the bump and contribution ❤️ , released as |
Support diagrams containing frontmatter directive. Might fix #48
Possibly a bit naive solution that seems to work, perhaps even the
codeSplitByDirectiveStart
block can be removed to with this fix?