[GRASS-SVN] r43487 - grass/trunk/tools

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 17 10:28:22 EDT 2010


Author: martinl
Date: 2010-09-17 14:28:22 +0000 (Fri, 17 Sep 2010)
New Revision: 43487

Modified:
   grass/trunk/tools/mkhtml.py
Log:
fix generating toc for manual pages


Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py	2010-09-17 12:58:06 UTC (rev 43486)
+++ grass/trunk/tools/mkhtml.py	2010-09-17 14:28:22 UTC (rev 43487)
@@ -92,6 +92,7 @@
     global src_data
     level  = 1
     idx    = 0
+    indent = 4
     
     sys.stdout.write('<a name="TOC"></a><h2>TABLE OF CONTENT</h2>\n\n<ul>\n')
     src_list = src_data.splitlines()
@@ -110,7 +111,8 @@
                 
         idx += 1
     
-    sys.stdout.write('</ul>\n')
+    for l in range(level, 0, -1):
+        sys.stdout.write('%s</ul>\n' % (' ' * (l - 1) * indent))
     src_data = '\n'.join(src_list)
 
 if not re.search('<html>', src_data, re.IGNORECASE):



More information about the grass-commit mailing list