From 1e0b63b55af936359f3d28cbd84ab4196bb345a5 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Sat, 13 Jan 2024 19:24:09 -0500 Subject: [PATCH] math bugfix --- R/tt_bootstrap.R | 6 +++--- inst/templates/bootstrap.html | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/tt_bootstrap.R b/R/tt_bootstrap.R index b9fac76e..d82b0d9e 100644 --- a/R/tt_bootstrap.R +++ b/R/tt_bootstrap.R @@ -113,10 +113,10 @@ bootstrap_setting <- function(x, new, component = "row") { } else if (component == "column") { idx <- grep("tinytable columns before this", out) } else if (component == "cell") { - idx <- grep("tinytable cells before this", out) - # idx <- 8 # hard-coded location (dangerous?) + idx <- utils::tail(grep("", out, fixed = TRUE), 1) + # idx <- grep("tinytable cells before this", out) } else if (component == "css") { - idx <- grep("", out, fixed = TRUE)[1] + idx <- grep("", out, fixed = TRUE) } else if (component == "newrows") { idx <- grep("tinytable new rows before this", out) } diff --git a/inst/templates/bootstrap.html b/inst/templates/bootstrap.html index 51aafa5a..8fea7026 100644 --- a/inst/templates/bootstrap.html +++ b/inst/templates/bootstrap.html @@ -42,7 +42,6 @@ newCell.setAttribute("colspan", colspan); newCell.innerText = content; } - // tinytable cells before this