St.markdown does not render mermaid graphs

Is there a way to ensure that mermaid annotations in markdown can be rendered as graphs using st.markdown?

Currently it only renders as text and does not convert to the graphical view

Hi @Gireesh_Ramji, welcome to the Streamlit community!

Please note that mermaid.js may be using Markdown-like syntax, but it’s not part of the actual Markdown specification. Given the unbounded number of libraries that might have Markdown-like syntax, it isn’t feasible for Streamlit to include all of them in the base distribution.

This would be a great candidate for a custom component, though it would likely take some understanding of JavaScript first.

Best,
Randy

3 Likes

Thanks @randyzwitch, cool we will look into building a custom component for this!