Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make all HTML attributes double-quoted

(coke++ for prodding me into doing this bit)
  • Loading branch information...
commit 6e1c01875e94176e08a489953e1407bbb5568cb2 1 parent 318baff
@flussence flussence authored
Showing with 7 additions and 10 deletions.
  1. +7 −10 lib/Pod/To/HTML.pm
View
17 lib/Pod/To/HTML.pm
@@ -52,7 +52,7 @@ sub metadata {
}
sub buildindexes {
- my $r = "<nav class='indexgroup'>\n";
+ my $r = qq[<nav class="indexgroup">\n];
my $indent = q{ } x 2;
my @opened;
@@ -69,11 +69,12 @@ sub buildindexes {
my $last = @opened[*-1] // 0;
if $last < $lvl {
$r ~= $indent x $last
- ~ "<ul class='indexList indexList$lvl'>\n";
+ ~ qq[<ul class="indexList indexList{$lvl}">\n];
@opened.push($lvl);
}
$r ~= $indent x $lvl
- ~ "<li class='indexItem indexItem$lvl'><a href='#{escape($head, 'uri')}'>{$head}</a>\n";
+ ~ qq[<li class="indexItem indexItem{$lvl}">]
+ ~ qq[<a href="#{escape($head, 'uri')}">{$head}</a>\n];
}
for ^@opened {
$r ~= $indent x @opened - 1 - $^left
@@ -90,9 +91,7 @@ sub heading2html($pod) {
return
sprintf('<h%d id="%s">', $lvl, escape($pod.content[0].content, 'uri'))
- ~ '<a class="u" href="#___top" title="click to go to top of document">'
- ~ $txt
- ~ '</a>'
+ ~ qq[<a class="u" href="#___top" title="go to top of document">{$txt}</a>]
~ "</h$lvl>\n";
}
@@ -147,13 +146,11 @@ sub table2html($pod) {
if $pod.headers {
@r.push(
- '<thead>',
- '<tr>',
+ '<thead><tr>',
$pod.headers.map(-> $cell {
"<th>{escape($cell, 'html')}</th>"
}),
- '</tr>',
- '</thead>'
+ '</tr></thead>'
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.