use strict; use warnings; use Test::More; use Text::Xslate; my $tx = Text::Xslate->new(syntax => 'Handlebars'); is( $tx->render_string( '
{{{body}}}
', { title => 'My New Post', body => 'This is my first post!' }, ), 'This is my first post!
', ); is( $tx->render_string( '{{{body}}}
', { title => 'All aboutTags', body => 'This is a post about <p> tags' }, ), '
This is a post about <p> tags
', ); # XXX I'm not sure what the safestring constructor should be called # it's effectively Handlebars::SafeString->new($str) in JS # maybe we can just use Text::Xslate's mark_raw directly is( $tx->render_string( '{{{body}}}
', { title => Handlebars::SafeString->new('All about <p> Tags'), body => 'This is a post about <p> tags' }, ), 'This is a post about <p> tags
', ); done_testing;