]> git.donarmstrong.com Git - lilypond.git/commitdiff
Texi2html: Fix displayed text for external links
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 7 Jul 2008 15:14:25 +0000 (17:14 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 7 Jul 2008 15:14:25 +0000 (17:14 +0200)
The default formatting for ext links was
  "See <a href=..>NODENAME</a> section 'SECTION' in BOOKNAME"
We only want <a href=..>NODENAME</a>, so I override the default
behavior with our much simpler one and don't call the default
handler any more

lilypond-texi2html.init

index aa67e655bf164af4e50b93acea2ad5d7e8fdb7f2..6ca04c3cfc9cf4266bc01b816929a814e8d540a3 100644 (file)
@@ -110,10 +110,11 @@ sub split_at_numbered_sections($$$)
 }
 
 
+
 # The default formatting of external refs returns e.g. 
-# "(lilypond-internals)Timing_translator", while we simply want "Timing_translator".
-# Solution: Remove all (...) from the file_and_node argument before calling
-# the default handler!
+# "(lilypond-internals)Timing_translator", so we remove all (...) from the 
+# file_and_node argument. Also, we want only a very simple format, so we don't
+# even call the default handler!
 sub lilypond_external_ref($$$$$$)
 {
   my $type = shift;
@@ -124,10 +125,16 @@ sub lilypond_external_ref($$$$$$)
   my $cross_ref = shift;
 
   $file_node =~ s/\(.*\)//;
-  return t2h_default_external_ref($type, $section, $book, $file_node, $href, $cross_ref);
+  $file_node = &$anchor('', $href, $file_node) if ($file_node ne '');
+  return &$I('%{node_file_href}', { 'node_file_href' => $file_node });
+
+#  Default: format as "see <a ..>NODE</a> section 'SECTION' in BOOK"
+#   return t2h_default_external_ref($type, $section, $book, $file_node, $href, $cross_ref);
 }
 
 
+
+
 # recursively generate the TOC entries for the element and its children (which
 # are only shown up to maxlevel. All ancestors of the current element are also 
 # shown with their immediate children, irrespective of their level.