comparison mercurial/minirst.py @ 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 ff26712a0c50
children e2df5b866d22
comparison
equal deleted inserted replaced
15190:6dc67dced8c1 15192:3834ca04664a
260 # === ==== === <- optional 260 # === ==== === <- optional
261 # 1 2 3 261 # 1 2 3
262 # x y z 262 # x y z
263 # === ==== === 263 # === ==== ===
264 if (block['type'] == 'paragraph' and 264 if (block['type'] == 'paragraph' and
265 len(block['lines']) > 4 and 265 len(block['lines']) > 2 and
266 _tablere.match(block['lines'][0]) and 266 _tablere.match(block['lines'][0]) and
267 block['lines'][0] == block['lines'][-1]): 267 block['lines'][0] == block['lines'][-1]):
268 block['type'] = 'table' 268 block['type'] = 'table'
269 block['header'] = False 269 block['header'] = False
270 div = block['lines'][0] 270 div = block['lines'][0]