Skip to content

Commit

Permalink
Update R/Renderer.R
Browse files Browse the repository at this point in the history
Co-authored-by: André Veríssimo <[email protected]>
Signed-off-by: kartikeya kirar <[email protected]>
  • Loading branch information
kartikeyakirar and averissimo authored Sep 15, 2023
1 parent 7a8ccd5 commit 4a7cfa9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions R/Renderer.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,17 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
params <- block$get_params()
params <- lapply(params, function(l) if (is.character(l)) shQuote(l) else l)
block_content <- block$get_content()
paste("### ",
sprintf(
"\n```{r, %s}\n%s\n```\n",
paste(names(params), params, sep = "=", collapse = ", "),
block_content
),
collapse = "\n"
)
paste(
sep = "\n",
collapse = "\n",
"### ",
sprintf(
"```{r, %s}", paste(names(params), params, sep = "=", collapse = ", ")
),
block_content,
"```",
""
)
},
pictureBlock2md = function(block) {
basename_pic <- basename(block$get_content())
Expand Down

0 comments on commit 4a7cfa9

Please sign in to comment.