Skip to content

Commit

Permalink
Work around breaking change in knitr 1.39.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekado committed Jun 1, 2022
1 parent a1c6317 commit 1787d16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/generate_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright © 2017, 2018 Alexander Gosdschan <[email protected]>
# Copyright © 2017, 2018, 2019 Alexander Blume <[email protected]>
# Copyright © 2017 Katarzyna Wreczycka <[email protected]>
# Copyright © 2017 Ricardo Wurmus <[email protected]>
# Copyright © 2017, 2022 Ricardo Wurmus <[email protected]>
#
# This file is part of the PiGx BSseq Pipeline.
#
Expand Down Expand Up @@ -63,6 +63,9 @@ render2HTML <- function(reportFile,
## render single report
message("rendering report from template: ", reportFile)

# knitr 1.39 changed the default behavior.
options(knitr.graphics.rel_path = FALSE)

htmlwidgets::setWidgetIdSeed(1234)
rmarkdown::render(
input = reportFile,
Expand Down
7 changes: 5 additions & 2 deletions scripts/report_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright © 2017 Bren Osberg <[email protected]>
# Copyright © 2017, 2018 Alexander Gosdschan <[email protected]>
# Copyright © 2017 Katarzyna Wreczycka <[email protected]>
# Copyright © 2017 Ricardo Wurmus <[email protected]>
# Copyright © 2017, 2022 Ricardo Wurmus <[email protected]>
#
# This file is part of the PiGx BSseq Pipeline.
#
Expand All @@ -30,7 +30,10 @@ render2HTML <- function(reportFile,
self.contained=TRUE,
logFile = NULL)
{


# knitr 1.39 changed the default behavior.
options(knitr.graphics.rel_path = FALSE)

output_format = rmarkdown::all_output_formats(reportFile, 'UTF-8')

if(!dir.exists(finalReportDir)) dir.create(finalReportDir, recursive = TRUE)
Expand Down

0 comments on commit 1787d16

Please sign in to comment.