Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOC sorted backwards #2

Open
janusw opened this issue Aug 3, 2013 · 2 comments
Open

TOC sorted backwards #2

janusw opened this issue Aug 3, 2013 · 2 comments

Comments

@janusw
Copy link
Contributor

janusw commented Aug 3, 2013

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
Copy link
Contributor Author

janusw commented Aug 3, 2013

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
Copy link
Owner

gumpu commented Jun 6, 2015

Thanks for the bug report and patch.

Will be fixed in the comming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants