remove \lab{} in second header in repeat_header for longtable LaTeX
diff --git a/R/kable_styling.R b/R/kable_styling.R
index a824d77..d7aa1f5 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -266,7 +266,8 @@
     )
   } else {
     if (repeat_header_method == "append") {
-      repeat_header_text <- paste(table_info$caption, repeat_header_text)
+      caption_without_lab <- sub("\\\\label\\{.*?\\}", "", table_info$caption)
+      repeat_header_text <- paste(caption_without_lab, repeat_header_text)
     }
     continue_line <- paste0("\\caption{", repeat_header_text, "}\\\\")
   }