Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown math code block syntax should have LaTeX syntax highlighting inside #174731

Open
fasiha opened this issue Feb 18, 2023 · 4 comments · May be fixed by #213750 or #219820
Open

Markdown math code block syntax should have LaTeX syntax highlighting inside #174731

fasiha opened this issue Feb 18, 2023 · 4 comments · May be fixed by #213750 or #219820
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities markdown Markdown support issues
Milestone

Comments

@fasiha
Copy link

fasiha commented Feb 18, 2023

Type: Bug

When editing a Markdown file, VS Code will apply LaTeX syntax highlighting to math in double-dollar signs (math blocks), e.g.,

$$
\frac{1}{0} = \infty
$$

will color frac and infty and the numbers.

GitHub Markdown also supports a math code block syntax (the triple-tick syntax; see reference), so the above could be written in GitHub-flavored Markdown as

$$\frac{1}{0} = \infty$$

GitHub will render the above as math, so here's what it looks like in Markdown:

```math
\frac{1}{0} = \infty
`'`

However, VS Code applies no syntax highlighting inside ```math blocks.

image

It'd be nice if it could apply the same highlighting as double-dollar signs.


VS Code version: Code 1.75.1 (Universal) (441438a, 2023-02-08T21:34:59.000Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Apple M1 (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 2, 2
Memory (System) 16.00GB (0.28GB free)
Process Argv --crash-reporter-id 842edd4e-1bf5-4a7a-9db0-8c5b7cec0f18
Screen Reader no
VM 0%
Extensions (19)
Extension Author (truncated) Version
prettier-vscode esb 9.10.4
linter-gfortran for 3.2.0
unicode-math-vscode Gui 0.3.5
isort ms- 2022.8.0
python ms- 2023.2.0
vscode-pylance ms- 2023.2.30
jupyter ms- 2023.1.2010391206
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.14
vscode-jupyter-cell-tags ms- 0.1.6
vscode-jupyter-slideshow ms- 0.1.5
cmake-tools ms- 1.13.45
cpptools ms- 1.14.3
cpptools-extension-pack ms- 1.3.0
vsliveshare ms- 1.0.5831
rewrap stk 1.16.3
cmake twx 0.0.17
clang-format xav 1.9.0
markdown-all-in-one yzh 3.5.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848:30662994
nodejswelcome1cf:30587006
2e4cg342:30602488
pyind779cf:30662993
89544117:30613380
pythonsymbol12:30657548
vsctsb:30662444

@mjbvz mjbvz added the feature-request Request for new features or functionality label Feb 20, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Feb 20, 2023
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@sriveravi

This comment was marked as duplicate.

@VSCodeTriageBot
Copy link
Collaborator

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@mgajda
Copy link

mgajda commented Aug 12, 2023

Having math block and code-block specific code linting would be also great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities markdown Markdown support issues
Projects
None yet
5 participants