mdmath icon indicating copy to clipboard operation
mdmath copied to clipboard

Inline math incorrectly treated as display math in kramdown delimiter mode

Open yunhao-qian opened this issue 4 years ago • 0 comments

Summary

When the delimiters setting is set to kramdown, an inline formula would be incorrectly treated as a display formula if it appears at the beginning of an HTML element. Any text that follows the problematic formula is discarded.

Expected behaviour

image

Actual behaviour

image

Steps to reproduce

  1. Install the "Markdown+Math" extension;
  2. The issue appears no matter whether the built-in LaTeX support of VSCode is enabled or not;
  3. Set "mdmath.delimiters": "kramdown";
  4. Issue can be reproduced with the code example below.

Code example

$$E = m c^2$$ Einstein

Listing example:

* $$p = m v$$ momentum
* $$F = m a$$ force

Related links

Environment

    Operating system: Ubuntu 20.04
    VSCode version: 1.63.0
    Markdown+Math version: 2.7.4

yunhao-qian avatar Dec 12 '21 16:12 yunhao-qian