diff --git a/.Rbuildignore b/.Rbuildignore index 38b376ed72..d0b8c19a89 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -22,10 +22,20 @@ tests/testthat/test-cols_align_decimal.R tests/testthat/test-cols_width_rtf.R tests/testthat/test-data_color.R tests/testthat/test-extract_cells.R +tests/testthat/test-fmt_bytes.R +tests/testthat/test-fmt_currency.R +tests/testthat/test-fmt_datetime.R tests/testthat/test-fmt_duration.R +tests/testthat/test-fmt_engineering.R tests/testthat/test-fmt_fraction.R +tests/testthat/test-fmt_integer.R +tests/testthat/test-fmt_markdown.R +tests/testthat/test-fmt_number.R tests/testthat/test-fmt_partsper.R +tests/testthat/test-fmt_passthrough.R +tests/testthat/test-fmt_percent.R tests/testthat/test-fmt_roman.R +tests/testthat/test-fmt_scientific.R tests/testthat/test-footer.R tests/testthat/test-group_column_label.R tests/testthat/test-gtsave.R diff --git a/DESCRIPTION b/DESCRIPTION index c7d23e8c31..b342edcb73 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,13 +34,14 @@ Imports: base64enc (>= 0.1-3), bigD (>= 0.1), bitops (>= 1.0-7), - cli (>= 3.3.0), + cli (>= 3.4.1), commonmark (>= 1.8), dplyr (>= 1.0.8), fs (>= 1.5.2), ggplot2 (>= 3.3.5), glue (>= 1.6.1), htmltools (>= 0.5.2), + juicyjuice (>= 0.1.0), magrittr (>= 2.0.2), rlang (>= 1.0.2), sass (>= 0.4.1), diff --git a/R/export.R b/R/export.R index e3977324ca..4d079753d1 100644 --- a/R/export.R +++ b/R/export.R @@ -395,20 +395,30 @@ as_raw_html <- function( # Perform input object validation stop_if_not_gt(data = data) + html_table <- as.character(as.tags.gt_tbl(data)) + if (inline_css) { - # Generation of the HTML table - html_table <- render_as_html(data = data) + font_vec <- unique(dt_options_get_value(data = data, option = "table_font_names")) + font_family_attr <- as_css_font_family_attr(font_vec = font_vec) - # Create inline styles html_table <- - inline_html_styles( - html = html_table, - css_tbl = get_css_tbl(data = data) + gsub( + pattern = "