Skip to content

Commit 7bc8b39

Browse files
authored
fix #2261: call add_html_caption() with two arguments instead of three in Quarto (#2285)
1 parent 4286eba commit 7bc8b39

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
## BUG FIXES
1414

15+
- Make the internal function `add_html_caption()` work with Quarto <= v1.3.353 (thanks, @giabaio, #2261).
16+
1517
- Fixed a bug in `spin(format = 'Rnw')` reported by @Tarious14 at https://github.com/yihui/yihui.org/discussions/769#discussioncomment-6587927
1618

1719
- When the chunk option `dev = 'svglite'`, the `svglite` device should be used to record plots (thanks, @Darxor, #2272).

R/output.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ sew.knit_asis = function(x, options, inline = FALSE, ...) {
502502
if (inherits(x, 'knit_asis_htmlwidget')) {
503503
options$fig.cur = plot_counter()
504504
options = reduce_plot_opts(options)
505+
# TODO: remove this when quarto > 1.3.353 is widely used
506+
if (is_quarto()) return(add_html_caption(options, wrap_asis(x, options)))
505507
# look for attribute 'aria-labelledby="label"' in the first HTML tag and
506508
# use the label to provide alt text if found
507509
return(add_html_caption(

0 commit comments

Comments
 (0)