Fixed #450
diff --git a/R/scroll_box.R b/R/scroll_box.R
index 39405cf..a1d1835 100644
--- a/R/scroll_box.R
+++ b/R/scroll_box.R
@@ -30,7 +30,10 @@
extra_css = NULL,
fixed_thead = TRUE
) {
-
+ kable_format <- attr(kable_input, "format")
+ if (kable_format != "html") {
+ return(kable_input)
+ }
kable_attrs <- attributes(kable_input)
fixed_thead <- get_fixed_thead(fixed_thead)
if (is.null(height)) fixed_thead$enabled <- FALSE
diff --git a/inst/NEWS.md b/inst/NEWS.md
index 45e89a1..7c49585 100644
--- a/inst/NEWS.md
+++ b/inst/NEWS.md
@@ -32,11 +32,13 @@
viewer. If you want to disable the default behavior, try to set
`options(kableExtra_view_html = F)`. (#455)
-* Added a few alternative HTML table themes. See https://haozhu233.github.io/kableExtra/awesome_table_in_html.html#Alternative_themes
+* Added a few alternative HTML table themes. See https://haozhu233.github.io/kableExtra/awesome_table_in_html.html#Alternative_themes. (#451)
* Added a `new_tab` option to `cell_spec` to control whether to open up links
in new tab. (#454)
+* Improved the behavior of `scroll_box` so it will skip non-html tables. (#450)
+
kableExtra 1.1.0
--------------------------------------------------------------------------------