Skip to content

Bad context for error messages #110

@cscheid

Description

@cscheid

In at least one setting, our context-detection mechanism for producing good error messages is failing. This is, specifically, a missing quote here:

https://github.com/djnavarro/blog/blob/main/posts/2022-03-04_data-types-in-arrow-and-r/index.qmd#L1168

Our parser, somehow, is convinced that the relevant opening quote happens 500 lines before it, and we end up with a pretty misleading error message.

Another one:

    Finished `dev` profile [optimized + debuginfo] target(s) in 0.05s
     Running `/Users/cscheid/repos/github/cscheid/kyoto/target/debug/quarto-markdown-pandoc -i ../../external-sites/stat479_fall2025/website/guides/plot_vertical_statsbomb.qmd`
Error: [Q-2-8] Unsupported Code Block Syntax
    ╭─[../../external-sites/stat479_fall2025/website/guides/plot_vertical_statsbomb.qmd:30:6]
    │
 21 │ ![StatsBomb Coordinate System](figures/statsbomb_coordinates.png){width=50% fig-align="center"}
    │                                                                             ────┬────
    │                                                                                 ╰────── use a YAML block syntax in a comment with `|`.
    │
 30 │ ```{r initial-plot}
    │      ┬
    │      ╰── Quarto Markdown requires executable code block options in YAML.
────╯

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions