]> git.donarmstrong.com Git - lilypond.git/commitdiff
texi2html: Handle sections without node attached (i.e. snippets)
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 5 Aug 2008 18:54:20 +0000 (20:54 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 5 Aug 2008 18:54:20 +0000 (20:54 +0200)
lilypond-texi2html.init

index c5b7927cff92f214b9fa8cd8ec4faf6ca4eb0cc1..2d853fec5be298dd0eb2993095c046e199042f1c 100644 (file)
@@ -254,6 +254,12 @@ sub split_at_numbered_sections($$$)
   my $docu_ext = $Texi2HTML::Config::EXTENSION;
 
   my $node_name = main::remove_texi($element->{'node_ref'}->{'texi'});
+  # the snippets page does not use nodes for the snippets, so in this case
+  # we'll have to use the section name!
+  if ($node_name eq '') {
+    $node_name = main::remove_texi($element->{'texi'});
+  }
+
   if (exists ($node_to_filename_map->{$node_name})) {
     (my $filename, my $anchor) = @{$node_to_filename_map->{$node_name}};
     $filename .= ".$docu_ext" if (defined($docu_ext));