goessner/mdmath

quotation freezes enter and backspace

liquidiert opened this issue · 3 comments

Summary

If you use md quotation syntax, like for stating a theorem, you can no longer use enter and backspace keys.

Expected behavior

Shouldn't disable(?) enter and backspace.

Steps to reproduce

  1. use md quotation syntax
  2. add some latex math
  3. keys get disabled

Related links

Environment

     Operating system: PopOS 20.04
       VSCode version: 1.47.3
Markdown+Math version: 2.5.1

Just realized it only occures when using multiline math syntax; e.g.:

> my fancy theorem (1)
>
> $$
\hat{y} = x_1+1 \\
x_1 := 5
$$ (1)

while something like this:

> theorem (2)
> 
> $$ \hat{w_0} = \tilde{y} - \hat{w_1}\tilde{x} \\
 \, \\
\hat{w_1} = \frac{\sum_{n=1}^N(x^{(n)}-\tilde{x})(y^{(n)}-\tilde{y})}{\sum_{n=1}^N(x^{(n)}-\tilde{x})^2} $$ (2)

works perfectly fine.

Presumably related:

Typing "$1-$2" breaks backspace and enter.

That's a problem with non-math documents, for example, type "senior engineers cost $10-$30 per hour".

Repro:

  • Start VS Code
  • Set Language Mode to "markdown"
  • Type $1-$2
  • Backspace and Enter no longer work

Disabling Markdown-math removes the problem.

Context:
Win 10 Pro x64 10.0.18363
VSCode 1.47.3 (user setup)
Markdown-Math 2.5.1
Markdown-all-in-one 3.2.0

above examples seem to work now with version 2.6 ...

> my fancy theorem (1)
>
> $$
\hat{y} = x_1+1 \\
x_1 := 5
$$ (1)

grafik

$1-$2

grafik