Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move footer-html into Pod::Htmlify
  • Loading branch information
Paul Cochrane committed Feb 20, 2015
1 parent 2898af7 commit f442416
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 0 additions & 5 deletions htmlify.p6
Expand Up @@ -63,11 +63,6 @@ sub header-html ($current-selection = 'nothing selected') is cached {
$header.subst('MENU', :p($menu-pos), $menu-items ~ $sub-menu-items);
}

sub footer-html() {
my $footer = slurp 'template/footer.html';
$footer.subst('DATETIME', ~DateTime.now);
}

sub p2h($pod, $selection = 'nothing selected') {
pod2html $pod,
:url(&url-munge),
Expand Down
5 changes: 5 additions & 0 deletions lib/Pod/Htmlify.pm6
Expand Up @@ -13,4 +13,9 @@ sub url-munge($_) is export {
return $_;
}

sub footer-html() is export {
my $footer = slurp 'template/footer.html';
$footer.subst('DATETIME', ~DateTime.now);
}

# vim: expandtab shiftwidth=4 ft=perl6
7 changes: 6 additions & 1 deletion t/pod-htmlify.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
use lib 'lib';

plan 2;
plan 3;

use_ok('Pod::Htmlify');
use Pod::Htmlify;
Expand All @@ -22,4 +22,9 @@ subtest {
is(url-munge('$*VAR'), '$*VAR', "sigil/twigil input");
}, "url-munge";

subtest {
plan 1;
isnt(footer-html(), "", "footer text isn't empty");
}, "footer-html";

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit f442416

Please sign in to comment.