mermaid-js / mermaid-live-editor

Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
https://mermaid.live
MIT License
3.82k stars 574 forks source link

Improvement for mermaid.live: Copy-paste indented content results in incorrect indentation #1465

Open lilian-lilifox opened 1 month ago

lilian-lilifox commented 1 month ago

Description

Sometimes, we got the code written on other application, and we would copy the code and paste it in the webpage. Then we can find that each line with indentation, get another unexpected redundant indentation than the line above, and the indentation become more and more in the flowing lines. Same problem can be found in vim or vs code if the setting is not proper.

Steps to reproduce

When I use mermaid.live with my firefox on linux, if I paste code with indentation, it will happen. And I had tested chrome, things didn't happened.

Screenshots

Screenshot_20240601_225432

Code Sample

No response

Setup

Suggested Solutions

No response

Additional Context

No response