Skip to content

Commit

Permalink
Changes template to non-URI-encode headers
Browse files Browse the repository at this point in the history
And also adds tests for it; changes main template too. Closes #50
  • Loading branch information
JJ committed Dec 8, 2018
1 parent a489b34 commit 5b4e4d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/templates/main.mustache
Expand Up @@ -15,7 +15,7 @@
</style>
{{# css }}<link rel="stylesheet" href="{{ css }}">{{/ css }}
{{# metadata }}{{{ metadata }}}{{/ metadata }}
{{ head }}
{{{ head }}}
</head>
<body class="pod">
<div id="___top"></div>
Expand Down
7 changes: 6 additions & 1 deletion t/120-templates.t
@@ -1,7 +1,7 @@
use Test; # -*- mode: perl6 -*-
use Test::Output;
use Pod::To::HTML;
plan 4;
plan 5;
my $r;

=begin pod
Expand Down Expand Up @@ -35,3 +35,8 @@ ok $r ~~ ms[[
$r = pod2html $=pod[0], :templates("t/templates");
ok $r ~~ ms[[ '<meta description="This is a new template"/>' ]], 'Gets text from new template';
ok $r ~~ ms[[ "<h1 class='title'>The usual suspects</h1>" ]], 'Fills template correctly';

my $head='<meta name=viewport content="width=device-width, initial-scale=1">';
$r = pod2html $=pod[0], :templates("t/templates"), :$head ;
ok $r ~~ ms[[ $head ]], 'headers are redered as is';

2 changes: 1 addition & 1 deletion t/templates/main.mustache
Expand Up @@ -16,7 +16,7 @@
</style>
{{# css }}<link rel="stylesheet" href="{{ css }}">{{/ css }}
{{# metadata }}{{{ metadata }}}{{/ metadata }}
{{ head }}
{{{ head }}}
</head>
<body class="pod">
<div id="___top"></div>
Expand Down

0 comments on commit 5b4e4d3

Please sign in to comment.