add add_header_left
diff --git a/R/magic_mirror.R b/R/magic_mirror.R
index 6276eae..d200a9d 100644
--- a/R/magic_mirror.R
+++ b/R/magic_mirror.R
@@ -71,7 +71,7 @@
)
# Contents
kable_info$contents <- str_match_all(kable_input, "\n(.*)\\\\\\\\")[[1]][,2]
- kable_info$contents <- latex_contents_escape(kable_info$contents)
+ kable_info$contents <- regex_escape(kable_info$contents, T)
if (kable_info$tabular == "longtable" & !is.na(kable_info$caption)) {
kable_info$contents <- kable_info$contents[-1]
}
@@ -87,15 +87,6 @@
return(kable_info)
}
-latex_contents_escape <- function(x) {
- x <- gsub("\\\\", "\\\\\\\\", x)
- x <- gsub("\\$", "\\\\\\$", x)
- x <- gsub("\\(", "\\\\(", x)
- x <- gsub("\\)", "\\\\)", x)
- x <- gsub("\\[", "\\\\]", x)
- x <- gsub("\\[", "\\\\]", x)
-}
-
#' Magic Mirror for html table --------
#'
#' @param kable_input The output of kable