Skip to content

Commit

Permalink
Simplified regex and added comment why backslashes are being converted
Browse files Browse the repository at this point in the history
  • Loading branch information
Htbaa committed Feb 26, 2011
1 parent dc52fec commit 0acdb2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/MojoX/Renderer/TT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ sub _template_content {
my $self = shift;
my ($path) = @_;

my ($t) = ($path =~ m{templates[\/|\\](.*)$});
$t =~ s/\\/\//g;
# Convert backslashes to forward slashes to make inline templates work on Windows
$path =~ s/\\/\//g;
my ($t) = ($path =~ m{templates\/(.*)$});

if (-r $path) {
return $self->SUPER::_template_content(@_);
Expand Down

0 comments on commit 0acdb2f

Please sign in to comment.