File tree 5 files changed +69
-2
lines changed
tests/docs/smoke-all/2024/01/22
5 files changed +69
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,12 @@ function shortcodes_filter()
285
285
Link = function (el )
286
286
el .target = code_shortcode :match (el .target )
287
287
return el
288
- end
288
+ end ,
289
+ Span = function (el )
290
+ if el .classes :includes (" quarto-shortcode__-escaped" ) then
291
+ return pandoc .Str (el .attributes [" data-value" ])
292
+ end
293
+ end ,
289
294
})
290
295
return doc
291
296
end
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ local html_table = tag(html_table_tag_name)
13
13
local html_table_caption = tag (" [Cc][Aa][Pp][Tt][Ii][Oo][Nn]" )
14
14
local html_paged_table = " <script data[-]pagedtable[-]source type=\" application/json\" >"
15
15
local html_gt_table = " <table class=\" gt_table\" >"
16
- local engine_escape = " {({+([^}]+)}+)}"
16
+ local engine_escape = " {({+([^< }]+)}+)}"
17
17
local shortcode = " {{+<[^>]+>}+}"
18
18
local latex_label = " (\\ label{([^}]+)})"
19
19
local latex_caption = " (\\ caption{([^}]+)})"
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ function engine_escape()
24
24
end
25
25
return " ```" .. engine
26
26
end )
27
+
28
+ -- handles escaped inline code cells within a code block
29
+ el .text = el .text :gsub (" (`+)" .. patterns .engine_escape , " %1%2" )
30
+
27
31
return el
28
32
end ,
29
33
Original file line number Diff line number Diff line change
1
+ ---
2
+ _quarto: {}
3
+ foo: bar
4
+ toc-title: Table of contents
5
+ ---
6
+
7
+ This doesn't unescape and should: `{r} 1.2`
8
+ This evaluates: 1.2
9
+ bar
10
+ In a phrase: bar
11
+ With quotes: `bar`
12
+ {{< meta foo >}}
13
+ In a phrase: {{< meta foo >}}
14
+ With quotes: `{{< meta foo >}}`
15
+
16
+ `bar` There's no more bug here.
17
+
18
+ `{{< meta foo >}}` There's no more bug here.
19
+
20
+ {{< meta foo >}} Hello?
21
+
22
+ bar Hello?
23
+
24
+ Hello, `{{< meta foo >}}`, `bar`.
25
+
26
+ `` `{{< meta foo >}}` ``, `` `bar` ``.
Original file line number Diff line number Diff line change
1
+ ---
2
+ engine : knitr
3
+ format : markdown
4
+ foo : bar
5
+ _quarto :
6
+ tests :
7
+ markdown :
8
+ ensureSnapshotMatches : true
9
+ ---
10
+
11
+ ```
12
+ This doesn't unescape and should: `{{r}} 1.2`
13
+ This evaluates: `{r} 1.2`
14
+ {{< meta foo >}}
15
+ In a phrase: {{< meta foo >}}
16
+ With quotes: `{{< meta foo >}}`
17
+ {{{< meta foo >}}}
18
+ In a phrase: {{{< meta foo >}}}
19
+ With quotes: `{{{< meta foo >}}}`
20
+ ```
21
+
22
+ ` {{< meta foo >}} ` There's no more bug here.
23
+
24
+ ` {{{< meta foo >}}} ` There's no more bug here.
25
+
26
+ {{{< meta foo >}}} Hello?
27
+
28
+ {{< meta foo >}} Hello?
29
+
30
+ Hello, ` {{{< meta foo >}}} ` , ` {{< meta foo >}} ` .
31
+
32
+ `` `{{{< meta foo >}}}` `` , `` `{{< meta foo >}}` `` .
You can’t perform that action at this time.
0 commit comments