make a small change
diff --git a/R/add_indent.R b/R/add_indent.R
index 098989c..19c9169 100644
--- a/R/add_indent.R
+++ b/R/add_indent.R
@@ -75,7 +75,9 @@
       }
     }
     new_rowtext <- paste(unlist(new_rowtext), collapse = " & ")
-    out <- sub(rowtext, new_rowtext, out, perl = TRUE)
+    out <- sub(paste0(rowtext, "(\\\\\\\\\\*?(\\[.*\\])?\n)"),
+               paste0(new_rowtext, "\\1"),
+               out, perl = TRUE)
     table_info$contents[i] <- new_rowtext
   }
   out <- structure(out, format = "latex", class = "knitr_kable")