Compare commits

...
Author SHA1 Message Date
Htbaa 0acdb2fcde Simplified regex and added comment why backslashes are being converted 2011-02-26 19:56:17 +01:00
Htbaa dc52fec399 Inline wrappers and includes now work on Windows
closes gh-13
2011-02-26 12:46:02 +01:00
Ask Bjørn Hansen a896a311bb Mark 1.11 in Changes 2011-02-06 16:00:58 -08:00
3 changed files with 9 additions and 3 deletions
+4
View File
@@ -1,6 +1,10 @@
Revision history for MojoX-Renderer-TT
{{$NEXT}}
- Inline wrappers and includes now work on Windows
(GH#13, Christiaan Kras)
1.11 February 6, 2011
- Change to use relative paths (Marcus Ramberg)
- Add exception template for tests
+3 -1
View File
@@ -150,7 +150,9 @@ sub _template_content {
my $self = shift;
my ($path) = @_;
my ($t) = ($path =~ m{templates[\/|\\](.*)$});
# 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(@_);
+2 -2
View File
@@ -94,13 +94,13 @@ __DATA__
@@ include.inc
Hello
@@ includes/include.inc
@@ includes/sub/include.inc
Hallo
@@ include.html.tt
[%- INCLUDE 'include.inc' -%]
Include!
[% INCLUDE 'includes/include.inc' -%]
[% INCLUDE 'includes/sub/include.inc' -%]
@@ layouts/layout.html.tt
w[%- content -%]d