Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion R/htmlwidgets.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ widget_html <- function(name, package, id, style, class, inline = FALSE, ...){

# call the custom function if we have one, otherwise create a div
if (is.function(fn)) {
fn(id = id, style = style, class = class, ...)
renderTags(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is the right fix. It might rather be to surround the results of the function in an html-preserve comment (which will also prevent pandoc from touching it). @jcheng5 What's the best thing here?

fn(id = id, style = style, class = class, ...)
)
} else if (inline) {
tags$span(id = id, style = style, class = class)
} else {
Expand Down