Self Checks
Dify version
0.15.1
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Mermaid flowchart rendered in neither flow-type or chat apps always failed due to the existence of line break(
, "\n") in mermaid code.
1. Error page when open the failed SVG file locally:
Error Info:
This page contains the following errors:
error on line 1 at column 8476: Opening and ending tag mismatch: br line 1 and p
Below is a rendering of the page up to the first error.
Screenshot:
https://img.picui.cn/free/2025/02/10/67a9bf2b85f7b.jpeg
2. Failed example in Chat App:
Sample code:
graph TD
A[用户<br>开始操作] --> B[系统<br>接收请求]
B --> C[验证<br>用户信息]
C --> D[处理<br>请求]
D --> E[返回<br>结果]
screenshot of failed page: https://img.picui.cn/free/2025/02/10/67a9bf2bbebd7.jpeg
screenshot of failed code: https://img.picui.cn/free/2025/02/10/67a9bf2bc93fa.jpeg
In other situations, mermaid code can rendered properly without any line break.
✔️ Expected Behavior
Mermaid code with line breaks rendered correctly.
❌ Actual Behavior
No response
Self Checks
Dify version
0.15.1
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Mermaid flowchart rendered in neither flow-type or chat apps always failed due to the existence of line break(
, "\n") in mermaid code.
1. Error page when open the failed SVG file locally:
Error Info:
Screenshot:
https://img.picui.cn/free/2025/02/10/67a9bf2b85f7b.jpeg
2. Failed example in Chat App:
Sample code:
screenshot of failed page: https://img.picui.cn/free/2025/02/10/67a9bf2bbebd7.jpeg
screenshot of failed code: https://img.picui.cn/free/2025/02/10/67a9bf2bc93fa.jpeg
In other situations, mermaid code can rendered properly without any line break.
✔️ Expected Behavior
Mermaid code with line breaks rendered correctly.
❌ Actual Behavior
No response