On Thu, Dec 17, 2009 at 9:53 PM, Reinhold Kainhofer
<[email protected]> wrote:
> Am Donnerstag, 17. Dezember 2009 22:15:11 schrieben Sie:
>> The first anchor on any html page is not necessary.
>
> Yes, that's my point: Given a file name blahblah.html and an anchor #blah, how
> would you determine whether a hyperlink to that (page, anchor) pair should use
> the URL
> blahblah.html#blah
> or without the anchor
> blahblah.html
1) Do we ever have blah.html#foo ? I thought that the first anchor
was always foo.html#foo (possibly with some weirdness if there's a
space, parenthesis, or whatever in the node name)
2) If not, a dictionary would work:
if (%filenames[anchor_name] == 1) {
link .= '#' + anchor_name;
} else {
%filenames[anchor_name] = 1;
}
that's probably not proper perl syntax, but the basic idea should be
solid. %filenames is a global variable, of course.
(is % the symbol for dictionary?)
Cheers,
- Graham
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel