Hello, This fixes translated bigpages by making
- single-word targets to be lowercased - anchors match targets - unneeded anchors be removed, sort of It brings back the policy of having anchors in English from original nodenames, thanks to translationof strings which were previously been ignored. The patch also contains an absurdity, namely fixing an $id which is then discarded. More refinements would come because I'm not sure if this breaks untranslated nodes or something. Anyway, big pages are perfectly usable now and sectioned HTML docs I've looked at keep working. I've had fun diving into Perl but please not more fun for a while :-) -- Francisco Vila. Badajoz (Spain) www.paconet.org , www.csmbadajoz.com
From fc7ae6e36f796f5832f35055308015311340ce9a Mon Sep 17 00:00:00 2001 From: Francisco Vila <francisco.v...@hispalinux.es> Date: Mon, 17 May 2010 02:41:46 +0200 Subject: [PATCH] Doc-build: fix targets and anchors for xrefs. --- Documentation/lilypond-texi2html.init | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index 3438478..02aefa6 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -657,10 +657,13 @@ sub lc_last($) { my $href = shift; my @hrefsplit = split('/', $href); - # change the last portion (the filename), if it exists + # change the last portion (the filename), if it exists; + # if it is a plain filename with no path, change the string as a whole if ($#hrefsplit > 0) { @hrefsplit[$#hrefsplit] = lc( @hrefsplit[$#hrefsplit] ); $href = join("/", @hrefsplit); + } else { + $href = lc($href); } return $href; } @@ -934,9 +937,9 @@ sub lilypond_element_target_name($$$) if ($target eq lc_last($id)) { $id = ""; } else { - $id = substr($id, 0, - 2); # remove the "-1" + $id =~ s/-1$//i; # remove any trailing "-1" } - return ($id, $target); + return ($target, $target); } @@ -1107,7 +1110,7 @@ sub lilypond_external_href($$$) sub remove_unneeded_anchor($) { - my $ref = shift; + my $href = shift; my @hrefsplit = split("/", $href); for ($i = 0; $i < @hrefsplit; $i++) { $item = @hrefsplit[$i]; -- 1.7.0.4
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel