We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reprex:
file.create("test.Rmd") writeLines(' --- title: "Untitled" output: html_document --- ```{r, cache = F, echo = F} library(htmltools) if (isTRUE(getOption("knitr.in.progress"))) { message("I am knitting") tagList( div(id = "include-iframeResizer"), htmlDependency( name = "iframeResizer", version = "4.2.8", src = c(href = "https://cdn.jsdelivr.net/npm/iframe-resizer@4.2.8/js/", file = "inst"), script = "iframeResizer.contentWindow.min.js", all_files = F ) ) } ```', con = "test.Rmd") sinew::pretty_rmd("test.Rmd", output = NULL, open_output = FALSE, create_library = FALSE)
Output is:
--- title: "Untitled" output: html_document --- ```{r, cache = F, echo = F} library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) library(htmltools) ```
The bug is related to pretty_rmd.R#158 mapply simplifying to matrix when there's just one chunk.
mapply
This makes it such that pretty_rmd.R#L167 copies the first line to all lines.
Fixed by #67 by adding SIMPLIFY = FALSE to prevent simplification of output from mapply on an Rmd with a single chunk to an array/matrix.
Does not appear to be an issue when create_library = TRUE and pretty_rmd_library is used instead.
create_library = TRUE
pretty_rmd_library
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reprex:
Output is:
The bug is related to pretty_rmd.R#158
mapply
simplifying to matrix when there's just one chunk.This makes it such that pretty_rmd.R#L167 copies the first line to all lines.
Fixed by #67 by adding SIMPLIFY = FALSE to prevent simplification of output from
mapply
on an Rmd with a single chunk to an array/matrix.Does not appear to be an issue when
create_library = TRUE
andpretty_rmd_library
is used instead.The text was updated successfully, but these errors were encountered: