markdown-preview.nvim icon indicating copy to clipboard operation
markdown-preview.nvim copied to clipboard

Inconsistent behaviour with GitHub on escaped backslashes in maths environment

Open Jackaed opened this issue 1 year ago • 0 comments

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

Jackaed avatar May 05 '24 22:05 Jackaed