quarto-dev / quarto-dev/quarto-cli

improve error message when `tbl-subcap` is used incorrectly

Open
#13,560 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement lint
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

---
title: "tbl-subcap"
format: html
---

```{r}
#| label: df
df <- tibble::tibble(ltrs = letters[1:3], ints = 1:3)
```

```{r}
#| label: tbl-df
#| tbl-cap: "Data Frame df"
#| tbl-subcap: "Various values"

df
```

The following error was generated:

  - ERROR (C:\PROGRA~1\RStudio\RESOUR~1\app\bin\quarto\share\pandoc\datadir\_json.lua:212) unexpected character 'V' at line 1 col 1


### Steps to reproduce

_No response_

### Actual behavior

_No response_

### Expected behavior

_No response_

### Your environment

_No response_

### Quarto check output

```{r}
quarto::quarto_version()
```
[1] ‘1.7.32’

Contributor guide

Open the contributing guide

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 provided R/Quarto document using tbl-subcap and inspect the reported _json.lua:212 failure during rendering. Trace how the invalid subcaption reaches that parser and make the resulting error identify the misuse clearly, then verify the same example no longer produces the opaque parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
cli
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.