Skip Menu |

This queue is for tickets about the Perl6-Perldoc CPAN distribution.

Report information
The Basics
Id: 105502
Status: new
Priority: 0/
Queue: Perl6-Perldoc

People
Owner: Nobody in particular
Requestors: LCONS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.000013
Fixed in: (no value)



Subject: Xhtml link formatter should trim spaces
Links might appear with extra spaces such as in: ... some text ... L<some name| http://a-very-loooooooong-url> The current formatter does not strip this extra space and the result is HTML with: <a href=" http://a-very-loooooooong-url">some name</a> The attached patch strips extra spaces.
Subject: Perl6-Perldoc.patch
--- lib/Perl6/Perldoc/To/Xhtml.pm- 2013-02-25 12:37:08.000000002 +0100 +++ lib/Perl6/Perldoc/To/Xhtml.pm 2015-06-26 12:25:53.000000002 +0200 @@ -596,6 +596,8 @@ sub to_xhtml { my $self = shift; my $target = $self->target() || '????'; + $target =~ s{\A\s+}{}; + $target =~ s{\s+\Z}{}; my $local_target = substr($target,0,1) eq '#'; my $url = $target =~ m{\A doc: ([^#] .*)}xms ? "$PERLDOC_ORG$1.html"