gumpu / ROBODoc

Documentation Extraction Tool
http://www.xs4all.nl/~rfsber/Robo/index.html
GNU General Public License v3.0
80 stars 21 forks source link

TOC sorted backwards #2

Open janusw opened 11 years ago

janusw commented 11 years ago

The "table of contents" page ("toc_index.html", generated via --toc) lists the top-level items in reversed alphabetical order, which is a bit awkward.

janusw commented 11 years ago

The following patch seems to fix it:

diff --git a/Source/html_generator.c b/Source/html_generator.c
index 0fccfea..555031a 100644
--- a/Source/html_generator.c
+++ b/Source/html_generator.c
@@ -707,7 +707,7 @@ void RB_HTML_Generate_TOC_2(
          * hierarchy of the headers.
          */
         fprintf( dest_doc, "<ul>\n" );
-        for ( i = 0; i < count; ++i )
+        for ( i = count -1 ; i >= 0; i-- )
         {
             header = headers[i];
             if ( owner == NULL )
gumpu commented 9 years ago

Thanks for the bug report and patch.

Will be fixed in the comming release.