comparison doc/gendoc.py @ 12813:13fdef670c43 stable

gendoc: support multi-line synopses
author Martin Geisler <mg@lazybytes.net>
date Sat, 23 Oct 2010 00:11:39 +0200
parents 4d431a31a76e
children 58bc5024805d
comparison
equal deleted inserted replaced
12812:4d431a31a76e 12813:13fdef670c43
128 if f.startswith("debug"): 128 if f.startswith("debug"):
129 continue 129 continue
130 d = get_cmd(h[f], cmdtable) 130 d = get_cmd(h[f], cmdtable)
131 sectionfunc(ui, d['cmd']) 131 sectionfunc(ui, d['cmd'])
132 # synopsis 132 # synopsis
133 ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1)) 133 ui.write("::\n\n")
134 ui.write("\n") 134 synopsislines = d['synopsis'].splitlines()
135 for line in synopsislines:
136 # some commands (such as rebase) have a multi-line
137 # synopsis
138 ui.write(" %s\n" % line.replace("hg ","", 1))
139 ui.write('\n')
135 # description 140 # description
136 ui.write("%s\n\n" % d['desc'][1]) 141 ui.write("%s\n\n" % d['desc'][1])
137 # options 142 # options
138 opt_output = list(d['opts']) 143 opt_output = list(d['opts'])
139 if opt_output: 144 if opt_output: