Fixed #396
diff --git a/R/collapse_rows.R b/R/collapse_rows.R
index 470f3f4..06d59d5 100644
--- a/R/collapse_rows.R
+++ b/R/collapse_rows.R
@@ -381,7 +381,7 @@
group_row_args <- merge_lists(group_row_args, row_group_label_fonts[[i]])
}
group_row_args <- merge_lists(
- list(kable_input = out, index = group_row_index_list[[i]]),
+ list(kable_input = out, index = group_row_index_list[[i]], escape = FALSE),
group_row_args)
out <- do.call(group_rows, group_row_args)
}
diff --git a/R/group_rows.R b/R/group_rows.R
index 3b22701..7579782 100644
--- a/R/group_rows.R
+++ b/R/group_rows.R
@@ -38,7 +38,7 @@
#' @param indent A T/F value to control whether list items are indented.
#' @param monospace T/F value to control whether the text of the
#' selected column need to be monospaced (verbatim)
-#' #' @param underline T/F value to control whether the text of the
+#' @param underline T/F value to control whether the text of the
#' selected row need to be underlined
#' @param strikeout T/F value to control whether the text of the
#' selected row need to be striked out.
@@ -233,6 +233,8 @@
if (escape) {
group_label <- input_escape(group_label, latex_align)
+ } else {
+ group_label <- sim_double_escape(group_label)
}
if (bold) {
diff --git a/R/util.R b/R/util.R
index b156260..4e5274f 100644
--- a/R/util.R
+++ b/R/util.R
@@ -170,3 +170,7 @@
return(ifelse(nchar(x) != origin_len, stringr::str_remove(x, "\\\\\\}$"), x))
}
+sim_double_escape <- function(x) {
+ return(sub("\\\\", "\\\\\\\\", x))
+}
+