Skip to content

Instantly share code, notes, and snippets.

@tomill
Created February 17, 2011 07:10
Show Gist options
  • Save tomill/831204 to your computer and use it in GitHub Desktop.
Save tomill/831204 to your computer and use it in GitHub Desktop.
use Text::Xslate qw/html_builder/;
use Text::Markdown;
my $template = Text::Xslate->new(
syntax => 'TTerse',
function => {
markdown => html_builder {
Text::Markdown::markdown(shift);
},
},
);
[% FILTER markdown %]
[% INCLUDE 'readme.md' %]
[% END %]
or
[% diary.text | markdown %]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment