Simplified regex and added comment why backslashes are being converted
This commit is contained in:
1 parent
dc52fec399
commit
0acdb2fcde
1 file changed
+3
-2
@@ -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(@_);
|
||||||
|
|||||||
Reference in new issue
Block a user