Fix #88
diff --git a/R/add_footnote.R b/R/add_footnote.R
index 6bc04d7..eaee90c 100644
--- a/R/add_footnote.R
+++ b/R/add_footnote.R
@@ -204,8 +204,8 @@
             }
           }
         }
-        export <- gsub("\\\\end\\{tabular\\}",
-                       paste0(footer, "\\\\end{tabular}"),
+        export <- gsub(table_info$end_tabular,
+                       paste0(footer, "\\\\end{", table_info$tabular, "}"),
                        export)
       }
     }
diff --git a/R/footnote.R b/R/footnote.R
index 92ad36a..96af153 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -149,4 +149,6 @@
   table_info <- magic_mirror(kable_input)
 
 
+
+
 }