doc/gendoc.py
changeset 9485 7d6ac5d7917c
parent 9484 c96d73dd956d
child 9622 9d1a480ca6ea
--- a/doc/gendoc.py	Sun Sep 27 10:04:51 2009 +0200
+++ b/doc/gendoc.py	Sun Sep 27 10:12:02 2009 +0200
@@ -4,6 +4,7 @@
 # fall back to pure modules if required C extensions are not available
 sys.path.append(os.path.join('..', 'mercurial', 'pure'))
 from mercurial import demandimport; demandimport.enable()
+from mercurial import encoding
 from mercurial.commands import table, globalopts
 from mercurial.i18n import _
 from mercurial.help import helptable
@@ -55,9 +56,9 @@
 
 def show_doc(ui):
     def section(s):
-        ui.write("%s\n%s\n\n" % (s, "-" * len(s)))
+        ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s)))
     def subsection(s):
-        ui.write("%s\n%s\n\n" % (s, '"' * len(s)))
+        ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
 
     # print options
     section(_("OPTIONS"))