Commit c301209
committed
feat: support quarto executable code block syntax
## Details
For `quarto`, executable code blocks are denoted by surrounding the
language name in curly braces. This is not valid `markdown` syntax
generally speaking but curly braces are handled by the parser, so this
plugin may as well support it as well, at least to some extent.
The way the parser is written leading spaces are ignored, and leading
curly braces are added to the info string, but not the language. Once
the language name ends (single word) any trailing text is also added to
the info string.
This change updates the logic of computing the info string around the
language to get any leading and trailing text, instead of assuming that
all text is trailing text. Text is positioned around the language in the
same way it would be in the underlying buffer. Info text can still be
disabled in the same way as before.1 parent 3115ff7 commit c301209
File tree
5 files changed
+16
-3
lines changed- doc
- lua/render-markdown
- render/markdown
- tests
5 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
0 commit comments