Show More
@@ -3324,7 +3324,8 b' def help_(ui, name=None, unknowncmd=Fals' | |||
|
3324 | 3324 | ('extensioncommands', _('Extension Commands'))): |
|
3325 | 3325 | if matches[t]: |
|
3326 | 3326 | ui.write('%s:\n\n' % title) |
|
3327 |
|
|
|
3327 | rst = ''.join(minirst.maketable(matches[t], 1)) | |
|
3328 | ui.write(minirst.format(rst)) | |
|
3328 | 3329 | return |
|
3329 | 3330 | |
|
3330 | 3331 | if name and name != 'shortlist': |
@@ -58,9 +58,9 b' def optrst(options, verbose):' | |||
|
58 | 58 | rst = minirst.maketable(data, 1) |
|
59 | 59 | |
|
60 | 60 | if multioccur: |
|
61 |
rst |
|
|
61 | rst.append(_("\n[+] marked option can be specified multiple times\n")) | |
|
62 | 62 | |
|
63 | return rst | |
|
63 | return ''.join(rst) | |
|
64 | 64 | |
|
65 | 65 | # list all option lists |
|
66 | 66 | def opttext(optlist, width, verbose): |
@@ -658,7 +658,7 b' def decorateblocks(blocks, width):' | |||
|
658 | 658 | return lines |
|
659 | 659 | |
|
660 | 660 | def maketable(data, indent=0, header=False): |
|
661 | '''Generate an RST table for the given table data''' | |
|
661 | '''Generate an RST table for the given table data as a list of lines''' | |
|
662 | 662 | |
|
663 | 663 | widths = [max(encoding.colwidth(e) for e in c) for c in zip(*data)] |
|
664 | 664 | indent = ' ' * indent |
@@ -674,4 +674,4 b' def maketable(data, indent=0, header=Fal' | |||
|
674 | 674 | if header and len(data) > 1: |
|
675 | 675 | out.insert(2, div) |
|
676 | 676 | out.append(div) |
|
677 |
return |
|
|
677 | return out |
General Comments 0
You need to be logged in to leave comments.
Login now