Fix #158
diff --git a/R/row_spec.R b/R/row_spec.R
index 0d3d74a..e4f6df1 100644
--- a/R/row_spec.R
+++ b/R/row_spec.R
@@ -194,9 +194,7 @@
                                      underline, strikeout,
                                      color, background, align, font_size, angle,
                                      hline_after, extra_latex_after)
-    out <- str_replace(out,
-                       paste0(target_row, "\\\\\\\\"),
-                       new_row)
+    out <- sub(paste0(target_row, "\\\\\\\\"), new_row, out, perl = T)
   }
 
   out <- structure(out, format = "latex", class = "knitr_kable")