File: 04_sort-perl-hash

package info (click to toggle)
texi2html 1.82%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 35,264 kB
  • sloc: perl: 15,901; xml: 6,075; sh: 3,977; makefile: 501
file content (23 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Sort hash values to produce reproducible documentation
Author: Maria Valentina Marin <marivalenm@gmail.com>

--- a/texi2html.pl
+++ b/texi2html.pl
@@ -6223,7 +6223,7 @@ sub rearrange_elements()
     }
 
     # use %sections and %headings to modify also the headings
-    foreach my $section (values(%sections), values(%headings))
+    foreach my $section (sort values(%sections), sort values(%headings))
     {
         if ($Texi2HTML::Config::NEW_CROSSREF_STYLE and ($section->{'cross'} =~ /\S/))
         {
@@ -6257,7 +6257,7 @@ sub rearrange_elements()
     }
 
     # construct human readable tocid
-    foreach my $section (values(%sections))
+    foreach my $section (sort values(%sections))
     {
         if ($Texi2HTML::Config::NEW_CROSSREF_STYLE and ($section->{'cross'} =~ /\S/))
         {