hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Dollar ($) symbol not escaped in inline MathJax

Open BenSchZA opened this issue 4 years ago • 0 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io
  • [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

Read our Official tutorial

It's on https://hackmd.io/c/tutorials/

或是中文版 https://hackmd.io/c/tutorials-tw/

What's the problem

Using inline MathJax/LaTeX formatting, the dollar symbol is not escaped. In multiline formatting, the dollar symbol is escaped as expected.

Current behaviour

image image

Provide steps to reproduce:

  1. Create a new document
  2. Add inline MathJax formatting delimiters ($...$)
  3. Add an escaped dollar symbol ($\$$)
  4. See that it is not rendered correctly / is not escaped, and that the symbol is correctly rendered in multiline formatting

See note link: https://hackmd.io/@benschza/SykGbt_Vd

Expected behaviour

Symbol escaped correctly in both inline and multiline formatting.

Environment

I use HackMD on:

Desktop

  • OS: macOS
  • Browser: Firefox
  • Browser Version: 86.0

Additional context

Add any other context about the problem here.

BenSchZA avatar Mar 24 '21 09:03 BenSchZA