quarto-dev / quarto-dev/quarto

[vscode] math blocks highlightetd as executable cells, but delimiting logic is broken

Open
#154 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

When I use the Quarto vscode extension it causes math blocks have a grey background colour. However the logic used to identify math blocks seems a bit broken.

In the following example the grey background stretches all the way from the 2nd to the 3rd equation, i.e. the extension is failing to recognize the $$ which ends the second display-math block:

image

This is not consistent with any other markdown/latex interpreter I know of. Weirdly the same highlighting also gets applied to my files which are markdown (.md), as well as my Quarto files (.qmd).

Minimal working example, which produces the highlighting shown above:

$$x^2$$

$$x^2
   y^2$$

$$x^2$$

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the minimal example in the Quarto VS Code extension using both .md and .qmd files, then inspect the extension's math-block delimiting and syntax-highlighting entry points. Done means each $$...$$ block receives its own grey background, including the multiline block, without highlighting the text between blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.