Add acknowledgement & bump version for CRAN release
diff --git a/R/linebreak.R b/R/linebreak.R
index adf5e95..df4ee91 100644
--- a/R/linebreak.R
+++ b/R/linebreak.R
@@ -1,5 +1,13 @@
#' Make linebreak in LaTeX Table cells
#'
+#' @description This function generate LaTeX code of `makecell` so that users
+#' can have linebreaks in their table
+#'
+#' @param x A character vector
+#' @param align Choose from "l", "c" or "r"
+#' @param double_escape Whether special character should be double escaped.
+#' Default is FALSE.
+#'
#' @export
linebreak <- function(x, align = c("l", "c", "r"), double_escape = F) {
if (is.numeric(x) | is.logical(x)) return(x)
@@ -16,3 +24,8 @@
x)
}
}
+
+linebreak_html <- function(x) {
+ if (is.numeric(x) | is.logical(x)) return(x)
+ ifelse(str_detect(x, "\n"), str_replace_all(x, "\n", "<br />"), x)
+}