use strict; use warnings; use Test::More; use Text::Xslate; my $tx = Text::Xslate->new(syntax => 'Handlebars'); is( $tx->render_string( '

{{title}}

{{{body}}}

', { title => 'My New Post', body => 'This is my first post!' }, ), '

My New Post

This is my first post!

', ); is( $tx->render_string( '

{{title}}

{{{body}}}

', { title => 'All about

Tags', body => 'This is a post about <p> tags' }, ), '

All 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( '

{{title}}

{{{body}}}

', { title => Handlebars::SafeString->new('All about <p> Tags'), body => 'This is a post about <p> tags' }, ), '

All About <p> Tags

This is a post about <p> tags

', ); done_testing;