Skip to content

Commit

Permalink
Merge pull request #29 from mysociety/master
Browse files Browse the repository at this point in the history
Remove indenting within compiled templates
  • Loading branch information
abw committed Jan 8, 2014
2 parents 6b07846 + 96241ab commit 34138b4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Template/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,10 @@ sub as_perl {
my ($class, $content) = @_;
my ($block, $defblocks, $metadata) = @$content{ qw( BLOCK DEFBLOCKS METADATA ) };

$block =~ s/\n(?!#line)/\n /g;
$block =~ s/\s+$//;

$defblocks = join('', map {
my $code = $defblocks->{ $_ };
$code =~ s/\n(?!#line)/\n /g;
$code =~ s/\s*$//;
" '$_' => $code,\n";
} keys %$defblocks);
Expand Down

0 comments on commit 34138b4

Please sign in to comment.