Skip to content

Commit 0ffce68

Browse files
committed
Remove trailing whitespace
1 parent 830b707 commit 0ffce68

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/Pod/To/HTML.pm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ sub escape_id ($id) {
6464
$id.trim.subst(/\s+/, '_', :g).subst('"', '"', :g);
6565
}
6666

67-
multi visit(Nil, |a) {
67+
multi visit(Nil, |a) {
6868
Debug { note colored("visit called for Nil", "bold") }
69-
}
69+
}
7070
multi visit($root, :&pre, :&post, :&assemble = -> *% { Nil }) {
7171
Debug { note colored("visit called for ", "bold") ~ $root.perl }
7272
my ($pre, $post);
7373
$pre = pre($root) if defined ⪯
74-
74+
7575
my @content = $root.?contents.map: {visit $_, :&pre, :&post, :&assemble};
7676
$post = post($root, :@content) if defined &post;
77-
77+
7878
return assemble(:$pre, :$post, :@content, :node($root));
7979
}
8080

@@ -141,14 +141,14 @@ sub assemble-list-items(:@content, :$node, *% ) {
141141

142142

143143
#| Converts a Pod tree to a HTML document.
144-
sub pod2html($pod, :&url = -> $url { $url }, :$head = '', :$header = '', :$footer = '', :$default-title,
144+
sub pod2html($pod, :&url = -> $url { $url }, :$head = '', :$header = '', :$footer = '', :$default-title,
145145
:$css-url = '//design.perl6.org/perl.css', :$lang = 'en',
146146
) is export returns Str {
147147
($title, $subtitle, @meta, @indexes, @body, @footnotes) = ();
148148
#| Keep count of how many footnotes we've output.
149149
my Int $*done-notes = 0;
150150
&OUTER::url = &url;
151-
151+
152152
@body.push: node2html($pod.map: { visit $_, :assemble(&assemble-list-items) });
153153

154154
my $title_html = $title // $default-title // '';
@@ -290,7 +290,7 @@ multi sub node2html(Pod::Block::Declarator $node) {
290290
}
291291
default {
292292
Debug { note "I don't know what {$node.WHEREFORE.WHAT.perl} is. Assuming class..." };
293-
"<h1>"~ node2html([$node.WHEREFORE.perl, q{: }, $node.contents])~ "</h1>";
293+
"<h1>"~ node2html([$node.WHEREFORE.perl, q{: }, $node.contents])~ "</h1>";
294294
}
295295
}
296296
}
@@ -531,14 +531,14 @@ multi sub node2inline(Pod::FormattingCode $node) returns Str {
531531
when 'X' {
532532
multi sub recurse-until-str(Str:D $s){ $s }
533533
multi sub recurse-until-str(Pod::Block $n){ $n.contents>>.&recurse-until-str().join }
534-
534+
535535
my $index-text = recurse-until-str($node).join;
536536
my @indices = $node.meta;
537537
my $index-name-attr = qq[index-entry{@indices ?? '-' !! ''}{@indices.join('-')}{$index-text ?? '-' !! ''}$index-text].subst('_', '__', :g).subst(' ', '_', :g).subst('%', '%25', :g).subst('#', '%23', :g);
538-
538+
539539
my $text = node2inline($node.contents);
540540
%crossrefs{$_} = $text for @indices;
541-
541+
542542
return qq[<a name="$index-name-attr"><span class="index-entry">$text\</span></a>] if $text;
543543
return qq[<a name="$index-name-attr"></a>];
544544
}

0 commit comments

Comments
 (0)