quarto-dev / quarto-dev/quarto

Extension fails to detect folding range in fenced divs

Open
#207 3 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

Taking the following example:

---
format: html
---

::: {.grid data-masonry='{ "itemSelector": ".grid-item", "gutter": 0 }'}
:::

The Quarto VSCode extension will fail to read/parse the folding range for the fenced div and kind of spam the IDE with popups.

[Error - 23:26:28] Request textDocument/foldingRange failed.
  Message: Request textDocument/foldingRange failed with message: Cannot read properties of undefined (reading '1')
  Code: -32603 

https://github.com/quarto-dev/quarto/assets/8896044/de948dc2-1471-4744-abe3-0ca38ba0dd2d

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 failure in the Quarto VSCode extension with the fenced-div example from the issue, then trace the textDocument/foldingRange handler and the fenced-div parsing path. Done means the example produces a folding range without the reported undefined-property error or repeated IDE popups.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.