Microsoft/vscode

Inside of multiline math expressions in markdown files is not recognized as math/latex context.

Open

#202.450 aperta il 14 gen 2024

Vedi su GitHub
 (4 commenti) (1 reazione) (2 assegnatari)TypeScript (10.221 fork)batch import
buggrammarhelp wantedmarkdown-ext

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.85.1
  • OS Version: Windows 11

In markdown file, multiline math expressions like the following are valid and supported by the official markdown preview feature. But the inside of the dollar signs is not recognized as math/latex context unless the beginning dollar sign is at the start of the line. I checked the context by "Inspect Editor Tokens and Scopes".

aaa $\begin{pmatrix}
1 & 2 \\
3 & 4 \\
\end{pmatrix}$ bbb

I have a lot of latex snippets for writing math expressions in markdown, but they are not suggested in such expressions for this issue.

btw, I have a setting "markdown.preview.breaks": true. When this is true, I think the only way to write an inline multiline math expression is like this.

Guida contributor