diff --git a/Tools/rst2text.lua b/Tools/rst2text.lua
index 8e91c054f..9f85ef67b 100644
--- a/Tools/rst2text.lua
+++ b/Tools/rst2text.lua
@@ -69,12 +69,17 @@ function Link (element)
   return content
 end
 
+local function addElementTitle (element, title)
+  return {
+    pandoc.Para{pandoc.Str("<-- " .. element.t .. " - " .. title .. " -->")},
+    element
+  }
+end
+
 function Table (element)
   local caption = pandoc.utils.stringify(element.caption.long)
   element.caption = {short={}, long={}}
-
-  local title = pandoc.Para{pandoc.Str("<-- Table - " .. caption .. " -->")}
-  return {title, element}
+  return addElementTitle(element, caption)
 end
 
 local function addElementIndicator (element, start, finish)
