Skip to content

feat: improve Quarto snippets#946

Open
mcanouil wants to merge 2 commits intoquarto-dev:mainfrom
mcanouil:feat/improve-snippets
Open

feat: improve Quarto snippets#946
mcanouil wants to merge 2 commits intoquarto-dev:mainfrom
mcanouil:feat/improve-snippets

Conversation

@mcanouil
Copy link
Copy Markdown
Contributor

@mcanouil mcanouil commented Apr 11, 2026

  • Fix a missing comma in the horizontal rule prefix array that had rendered the file invalid JSON.
  • Fix the raw code block syntax so Pandoc raw attributes use the required = prefix ({=html} rather than {html}).
  • Fix htm to html in the fenced code block language dropdown, drop the non-standard console, normalise c++/c# to cpp/csharp, and add bash, html, r, rust, sql, toml, typescript, xml, and yaml.
  • Add typst to the raw code block dropdown.
  • Restore the .column content lines and add tab stops to columns2 and columns3, drop the trailing <!-- end columns --> marker, and append a final $0 so the cursor exits the block cleanly.
  • Normalise final cursor placement with $0 on single-line snippets (quote, strikethrough, heading1-heading6).
  • Surround block-level snippets (headings, lists, code blocks, divs, blockquote, horizontal rule) with empty lines so the inserted content does not collide with adjacent paragraphs and, for the horizontal rule, cannot be parsed as a setext heading or YAML block delimiter.
  • Add yaml for frontmatter, figure for an image with #fig- id and fig-alt, xref for a Quarto cross-reference div (fig-/tbl-/lst-), list-table for a Quarto .list-table div, and tabset for a .panel-tabset block.
  • Update the div snippet to use a single placeholder covering id, class, and key-value attributes (::: {#id .class1 key=value}) rather than only a class.

Fix a missing comma in the horizontal rule prefix array that rendered
the file invalid JSON.
Fix the raw codeblock syntax so Pandoc raw attributes use the required
`=` prefix (for example `{=html}` rather than `{html}`).
Fix `htm` to `html` in the fenced code block language dropdown, drop
the non-standard `console`, normalise `c++`/`c#` to `cpp`/`csharp`, and
add commonly used languages (bash, html, r, rust, sql, toml, typescript,
xml, yaml).
Add `typst` to the raw code block dropdown.

Restore the `.column` content lines and add tab stops to `columns2` and
`columns3` so users can fill each column, drop the trailing
`<!-- end columns -->` marker that leaked an HTML comment into the
rendered output, and append a final `$0` so the cursor exits the block
cleanly.

Normalise final cursor placement with `$0` on single-line snippets
(quote, strikethrough, headings 1-6).

Surround block-level snippets (headings, lists, code blocks, divs,
blockquote, horizontal rule) with empty lines so the inserted content
does not collide with adjacent paragraphs and, for the horizontal
rule, cannot be parsed as a setext heading.

Add five new snippets: `yaml` for frontmatter, `figure` for an image
with `#fig-` id and `fig-alt`, `xref` for a Quarto cross-reference div
(fig/tbl/lst), `list-table` for a Quarto `.list-table` div, and
`tabset` for a `.panel-tabset` block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant