Commits

bmu committed 6de4adb

better header formatting for GridTable

  • Participants
  • Parent commits ba716f3

Comments (0)

Files changed (1)

             ret.append('.. table:: %s' % self.caption)
             ret.append('')
         ret.append(self._indent() + self._row_sep)
-        for headline in self.header:
-            ret.append(self._wrap_row(headline))
+        headlines = len(self.header)
+        for index, headline in enumerate(self.header):
+            ret.append(self._indent() + self._wrap_row(headline))
+            # append a separation up to the last line
+            if index < (headlines - 1):
+                ret.append(self._indent() + self._row_sep)
         ret.append(self._indent() + self._head_sep)
         for row in self.rows:
             ret.append(self._wrap_row(row))