Skip to content

Commit

Permalink
fix #2261: call add_html_caption() with two arguments instead of thre…
Browse files Browse the repository at this point in the history
…e in Quarto
  • Loading branch information
yihui committed Sep 5, 2023
1 parent 4286eba commit 3382f83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## BUG FIXES

- Make the internal function `add_html_caption()` work with Quarto <= v1.3.353 (thanks, @giabaio, #2261).

- Fixed a bug in `spin(format = 'Rnw')` reported by @Tarious14 at https://github.com/yihui/yihui.org/discussions/769#discussioncomment-6587927

- When the chunk option `dev = 'svglite'`, the `svglite` device should be used to record plots (thanks, @Darxor, #2272).
Expand Down
2 changes: 2 additions & 0 deletions R/output.R
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ sew.knit_asis = function(x, options, inline = FALSE, ...) {
if (inherits(x, 'knit_asis_htmlwidget')) {
options$fig.cur = plot_counter()
options = reduce_plot_opts(options)
# TODO: remove this when quarto > 1.3.353 is widely used
if (is_quarto()) return(add_html_caption(options, wrap_asis(x, options)))
# look for attribute 'aria-labelledby="label"' in the first HTML tag and
# use the label to provide alt text if found
return(add_html_caption(
Expand Down

0 comments on commit 3382f83

Please sign in to comment.