Double hyphens (--) in PR descriptions are turned into em-dashes (—) even in the plain text markdown editor, which breaks markdown comments
Version
0.14.18
Operating System
macOS
Distribution Method
dmg (Mac OS - Apple Silicon)
Describe the issue
I noticed this issue while using PR templates, our PR template uses markdown comments for additional guidance. For example
### Section heading
<!-- Some helpful text to clarify things for developers writing PRs -->
When I import the PR template into Gitbutler's PR editor, I noticed that the closing in these comment sections (-->) was replaced with a —> - the text editor had converted the double hyphens into em-dashes. This causes some strange rendering issues when the markdown hits Github.
I was able to replicate the issue by pasting or typing a markdown comment into the plain text editor, I've attached a screen recording to demonstrate.
https://github.com/user-attachments/assets/25245c51-c841-4986-8bef-5ee8dea76aef
How to reproduce (Optional)
- Create a new PR from the Gitbutler UI
- Add a markdown comment to the PR description, for example
<!-- markdown comment --> - You should be able to see that the hyphens in at least one of the comment tags has changed to an em-dash
Expected behavior (Optional)
The plain text editor should always retain the original hyphens
Relevant log output (Optional)
Thanks a lot for reporting, the video makes the issue crystal clear!
Indeed, in the plain-text editor one would least expect such effect, apparently some smartness is still going on there. I wonder if this will also happen in the rich-text editor, but that would be my guess.
In any case, I am sure @estib-vega will make short work of it.