changeset 15192:3834ca04664a

rst: fix detection of single-row tables This fixes option lists for commands with only an --mq option.
author Matt Mackall <mpm@selenic.com>
date Sun, 02 Oct 2011 13:13:46 -0500
parents 6dc67dced8c1
children a84e3ed661cb
files mercurial/commands.py mercurial/minirst.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Oct 02 13:02:15 2011 -0500
+++ b/mercurial/commands.py	Sun Oct 02 13:13:46 2011 -0500
@@ -2768,6 +2768,7 @@
             data.append((so, lo, desc))
 
         rst = minirst.maketable(data, 1)
+
         if multioccur:
             rst += _("\n[+] marked option can be specified multiple times")
 
--- a/mercurial/minirst.py	Sun Oct 02 13:02:15 2011 -0500
+++ b/mercurial/minirst.py	Sun Oct 02 13:13:46 2011 -0500
@@ -262,7 +262,7 @@
         #  x    y   z
         # === ==== ===
         if (block['type'] == 'paragraph' and
-            len(block['lines']) > 4 and
+            len(block['lines']) > 2 and
             _tablere.match(block['lines'][0]) and
             block['lines'][0] == block['lines'][-1]):
             block['type'] = 'table'