iamcco / iamcco/markdown-preview.nvim
Inconsistent behaviour with GitHub on escaped backslashes in maths environment
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 411
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When a double backslash is placed in a maths environment, the GitHub markdown render treats this as it would treat a normal, single backslash, whereas markdown-preview treats this as a newline.
This is a VERY niche inconsistency but it matters in my particular use-case because `mdformat` decides to escape all backslashes placed, including in maths environments. This can be fixed using `mdformat-myst` but that isn't yet published on NixOS so I can't use it (I'm attempting to get it packaged).
As issues go, this is about as low priority as they come.
**To Reproduce**
Steps to reproduce the behavior:
1. Place a double backslash in a maths equation in a markdown file
2. Open the preview
3. See that it is treated as a newline
**Expected behavior**
Follow GitHub's behaviour on this and treat it as a normal backslash in the maths environment.
**Desktop (please complete the following information):**
- OS: NixOS
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.