Commit 60d8ba8
feat: improve Quarto snippets (#946)
* feat: improve Quarto snippets
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.
* docs: add changelog entry for snippets improvements
---------
Co-authored-by: Elliot <key.draw@gmail.com>1 parent 20e529f commit 60d8ba8
2 files changed
Lines changed: 149 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | | - | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | | - | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | | - | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
81 | | - | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
86 | | - | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
95 | | - | |
96 | | - | |
| 108 | + | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
111 | | - | |
| 124 | + | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
116 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
117 | 138 | | |
118 | 139 | | |
119 | 140 | | |
120 | 141 | | |
121 | | - | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
| |||
129 | 150 | | |
130 | 151 | | |
131 | 152 | | |
| 153 | + | |
132 | 154 | | |
| 155 | + | |
133 | 156 | | |
134 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
135 | 160 | | |
136 | 161 | | |
137 | 162 | | |
138 | 163 | | |
139 | 164 | | |
140 | 165 | | |
| 166 | + | |
141 | 167 | | |
142 | | - | |
| 168 | + | |
143 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
144 | 173 | | |
145 | | - | |
| 174 | + | |
146 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
147 | 179 | | |
148 | | - | |
| 180 | + | |
149 | 181 | | |
150 | | - | |
151 | | - | |
| 182 | + | |
| 183 | + | |
152 | 184 | | |
153 | 185 | | |
154 | 186 | | |
155 | 187 | | |
156 | 188 | | |
157 | 189 | | |
| 190 | + | |
158 | 191 | | |
159 | | - | |
| 192 | + | |
160 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
161 | 197 | | |
162 | | - | |
| 198 | + | |
163 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
164 | 203 | | |
165 | | - | |
| 204 | + | |
166 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
167 | 209 | | |
168 | | - | |
| 210 | + | |
169 | 211 | | |
170 | | - | |
| 212 | + | |
| 213 | + | |
171 | 214 | | |
172 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
173 | 291 | | |
174 | 292 | | |
0 commit comments