diff --git a/mercurial/minirst.py b/mercurial/minirst.py
--- a/mercurial/minirst.py
+++ b/mercurial/minirst.py
@@ -559,13 +559,17 @@ def formathtml(blocks):
out.append('%s\n' % (level, escape(lines[0]), level))
elif btype == 'table':
table = b['table']
- t = []
+ out.append('
\n')
for row in table:
- l = []
+ out.append('')
for v in row:
- l.append('%s | ' % escape(v))
- t.append('
%s
\n' % '\n'.join(l))
- out.append('\n' % ''.join(t))
+ out.append('')
+ out.append(escape(v))
+ out.append(' | ')
+ out.append('\n')
+ out.pop()
+ out.append('\n')
+ out.append('
\n')
elif btype == 'definition':
openlist('dl', level)
term = escape(lines[0])