diff doc/gendoc.py @ 9485:7d6ac5d7917c

test-gendoc: add tests for all languages This ensures that we catch errors in the reST syntax early and for all languages. The only change needed in gendoc.py was to correct the computation of section underlines for Asian languages.
author Martin Geisler <mg@lazybytes.net>
date Sun, 27 Sep 2009 10:12:02 +0200
parents c96d73dd956d
children 9d1a480ca6ea
line wrap: on
line diff
--- 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"))