put vphantom at the end of the line as @steveputman suggested
diff --git a/R/util.R b/R/util.R
index 3f8237a..75efb12 100644
--- a/R/util.R
+++ b/R/util.R
@@ -123,9 +123,7 @@
for (i in which(dup_index != 1)) {
dup_row <- table_info$contents[i]
empty_times <- dup_index[i] - 1
- new_row <- str_replace(
- dup_row, "&",
- paste0("& \\\\\\\\vphantom\\\\{", empty_times, "\\\\}"))
+ new_row <- paste0(dup_row, "\\\\vphantom\\{", empty_times, "\\}")
kable_input <- str_replace(kable_input, dup_row, new_row)
table_info$contents[i] <- new_row
}