lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: website search box


From: Graham Percival
Subject: Re: website search box
Date: Thu, 17 Dec 2009 21:58:32 +0000

On Thu, Dec 17, 2009 at 9:53 PM, Reinhold Kainhofer
<address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]