From a8ad1e32b4c81cf9a69d267899f7fa631ebe505c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 3 Dec 2015 03:14:43 -0500 Subject: handle nested raw text blocks (#6) --- lib/Text/Xslate/Syntax/Handlebars.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Text/Xslate/Syntax/Handlebars.pm b/lib/Text/Xslate/Syntax/Handlebars.pm index ce21c68..05b76d5 100644 --- a/lib/Text/Xslate/Syntax/Handlebars.pm +++ b/lib/Text/Xslate/Syntax/Handlebars.pm @@ -105,7 +105,12 @@ sub split_tags { } } if (@raw_text) { - $raw_text[-1] .= $tag_start . $code . $tag_end; + if ($close_tag eq '}}}') { + $raw_text[-1] .= '{{{' . $code . '}}}'; + } + else { + $raw_text[-1] .= $tag_start . $code . $tag_end; + } } if ($code =~ m{^[#^]} || $code eq 'else') { push @raw_text, ''; -- cgit v1.2.3-54-g00ecf