Skip to content
New issue

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

address issue with Glimma plots not appearing #99

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Title: Standard styles for vignettes and other Bioconductor documents
Description: Provides standard formatting styles for Bioconductor PDF
and HTML documents. Package vignettes illustrate use and
functionality.
Version: 2.29.0
Version: 2.29.1
Authors@R: c(
person("Andrzej", "Oleś", role = "aut",
comment = c(ORCID = "0000-0003-0285-2787")
Expand Down
8 changes: 8 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
CHANGES IN VERSION 2.30.0

BUG FIXES

o BiocStyle no longer breaks Javascript inserted by the Glimma package to
produce interactive plots.
(https://github.com/Bioconductor/BiocStyle/issues/97)

CHANGES IN VERSION 2.28.0
------------------------

Expand Down
10 changes: 8 additions & 2 deletions R/html_document.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,14 @@ process_footnotes = function(lines) {
## We wrap tables in a <div> so they can fill the screen on mobile
## but also scroll if they overflow horizontally
process_tables = function(lines) {
lines = gsub("<table", "<div class='horizontal-scroll'><table", lines, fixed = TRUE)
lines = gsub("</table>", "</table></div>", lines, fixed = TRUE)

## this will inadvertently mess up some javascript e.g. from Glimma
## so we only modify the body of the html
body_start = grep(pattern = "<body>", x = lines, fixed = TRUE)
body_end = grep(pattern = "</body>", x = lines, fixed = TRUE)

lines[body_start:body_end] = gsub("<table", "<div class='horizontal-scroll'><table", lines[body_start:body_end], fixed = TRUE)
lines[body_start:body_end] = gsub("</table>", "</table></div>", lines[body_start:body_end], fixed = TRUE)
lines
}

Expand Down