Simplified regex and added comment why backslashes are being converted

This commit is contained in:
Htbaa committed 2011-02-26 19:56:17 +01:00
1 parent dc52fec399
commit 0acdb2fcde
1 file changed
+3 -2
+3 -2
View File
@@ -150,8 +150,9 @@ sub _template_content {
my $self = shift; my $self = shift;
my ($path) = @_; my ($path) = @_;
my ($t) = ($path =~ m{templates[\/|\\](.*)$}); # Convert backslashes to forward slashes to make inline templates work on Windows
$t =~ s/\\/\//g; $path =~ s/\\/\//g;
my ($t) = ($path =~ m{templates\/(.*)$});
if (-r $path) { if (-r $path) {
return $self->SUPER::_template_content(@_); return $self->SUPER::_template_content(@_);