in reply to Re^3: Request for Perl 6 links (code)
in thread Request for Perl 6 links
The line anchors match #line_(\d+).
The section anchors are a bit more tricky, I tried to track how they are generated. The POD is parsed by smartlinks.pl, the HTML generated by Pod::Simple::HTML.
There the line anchors are piped through section_name_tidy, which is defined as follows:
sub section_name_tidy { my($self, $section) = @_; $section =~ tr/ /_/; $section =~ tr/\x00-\x1F\x80-\x9F//d if 'A' eq chr(65); # drop crazy + characters $section = $self->unicode_escape_url($section); $section = '_' unless length $section; return $section; } # and sub unicode_escape_url { my($self, $string) = @_; $string =~ s/([^\x00-\xFF])/'('.ord($1).')'/eg; # Turn char 1234 into "(1234)" return $string; }
I haven't found the place yet where whitespaces are substituted by underscores :(, but doing that the operations above, followed by a normal url encode should be sufficient. Hopefully.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Request for Perl 6 links (code)
by tye (Sage) on Aug 07, 2007 at 16:48 UTC |