bump version; also change extra header row layout
diff --git a/DESCRIPTION b/DESCRIPTION
index 210c06b..bb45a25 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Package: kableExtra
Type: Package
Title: Construct Complex Table with 'kable' and Pipe Syntax
-Version: 0.2.1
+Version: 0.2.1.9000
Authors@R: c(
person('Hao', 'Zhu', email = 'haozhu233@gmail.com', role = c('aut', 'cre')),
person('Will', 'Beasley', email = 'wibeasley@hotmail.com', role = 'ctb'),
diff --git a/R/add_header_above.R b/R/add_header_above.R
index 0f39d43..4ca0a33 100644
--- a/R/add_header_above.R
+++ b/R/add_header_above.R
@@ -74,11 +74,13 @@
htmlTable_new_header_generator <- function(header_df) {
header_items <- apply(header_df, 1, function(x) {
- if (x[2] == 1 | trimws(x[1]) == "") {
+ if (trimws(x[1]) == "") {
paste0('<th style="border-bottom:hidden"></th>')
} else {
- paste0('<th style="text-align:center;" colspan="', x[2], '">',
- x[1], '</th>')
+ paste0('<th style="text-align:center; border-bottom:hidden; ',
+ 'padding-bottom:0; padding-left:3px;padding-right:3px;" colspan="',
+ x[2], '"><div style="border-bottom: 1px solid #ddd;">',
+ x[1], '</div></th>')
}
})
header_text <- paste(c("<tr>", header_items, "</tr>"), collapse = "")