Mercurial > hg
changeset 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 |
files | doc/gendoc.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/gendoc.py Sat Oct 23 00:01:09 2010 +0200 +++ b/doc/gendoc.py Sat Oct 23 00:11:39 2010 +0200 @@ -130,8 +130,13 @@ d = get_cmd(h[f], cmdtable) sectionfunc(ui, d['cmd']) # synopsis - ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1)) - ui.write("\n") + ui.write("::\n\n") + synopsislines = d['synopsis'].splitlines() + for line in synopsislines: + # some commands (such as rebase) have a multi-line + # synopsis + ui.write(" %s\n" % line.replace("hg ","", 1)) + ui.write('\n') # description ui.write("%s\n\n" % d['desc'][1]) # options