gendoc: rename underlined/bold to section/subsection
authorMartin Geisler <mg@lazybytes.net>
Fri, 31 Jul 2009 11:40:03 +0200
changeset 9296 5043a5b16d91
parent 9295 b0f447a259ab
child 9297 3d78a6c5bdc0
gendoc: rename underlined/bold to section/subsection
doc/gendoc.py
--- a/doc/gendoc.py	Mon Aug 03 00:01:50 2009 +0200
+++ b/doc/gendoc.py	Fri Jul 31 11:40:03 2009 +0200
@@ -54,18 +54,18 @@
     return d
 
 def show_doc(ui):
-    def bold(s, text=""):
-        ui.write("%s\n%s\n%s\n" % (s, "="*len(s), text))
-    def underlined(s, text=""):
-        ui.write("%s\n%s\n%s\n" % (s, "-"*len(s), text))
+    def section(s):
+        ui.write("%s\n%s\n\n" % (s, "-" * len(s)))
+    def subsection(s):
+        ui.write("%s\n%s\n\n" % (s, '"' * len(s)))
 
     # print options
-    underlined(_("OPTIONS"))
+    section(_("OPTIONS"))
     for optstr, desc in get_opts(globalopts):
         ui.write("%s\n    %s\n\n" % (optstr, desc))
 
     # print cmds
-    underlined(_("COMMANDS"))
+    section(_("COMMANDS"))
     h = {}
     for c, attr in table.items():
         f = c.split("|")[0]
@@ -101,8 +101,8 @@
             ui.write(_("    aliases: %s\n\n") % " ".join(d['aliases']))
 
     # print topics
-    for names, section, doc in helptable:
-        underlined(section.upper())
+    for names, sec, doc in helptable:
+        section(sec.upper())
         if callable(doc):
             doc = doc()
         ui.write(doc)