From: Reinhold Kainhofer Date: Mon, 7 Jul 2008 15:14:25 +0000 (+0200) Subject: Texi2html: Fix displayed text for external links X-Git-Tag: release/2.11.58-1~32^2~129 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aba80835fc3a1224a61024022a778d5ef7410718;p=lilypond.git Texi2html: Fix displayed text for external links The default formatting for ext links was "See NODENAME section 'SECTION' in BOOKNAME" We only want NODENAME, so I override the default behavior with our much simpler one and don't call the default handler any more --- diff --git a/lilypond-texi2html.init b/lilypond-texi2html.init index aa67e655bf..6ca04c3cfc 100644 --- a/lilypond-texi2html.init +++ b/lilypond-texi2html.init @@ -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 NODE 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.