Replies: 1 comment 1 reply
-
|
Using Markdent is pretty nice: sub markdown_to_html($self, $markdown) {
my $capture;
open my $fh, '>', \$capture;
Markdent::Parser->new(
dialects => ['GitHub', 'Theory'],
handler => Markdent::Handler::HTMLStream::Fragment->new(output => $fh)
)->parse( markdown => $markdown );
close $fh;
return $capture;
}What you are describing (if I understand corectly) with regards to unifying templates rendering markdown and ultimately rendering html (maybe?) should be fairly trivial. I might have totally misunderstood what you are asking though. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Do we have a good guide to provide Markdown+Embedded Perl rendering?
I'd like to be able to include some subtemplates, written in Markdown, that may have some EP in them (mostly links from routes).
Just a bit stumped on how to properly approach this.
I'm guessing one will need to provide a handler, that first executes the normal ep handler, and then runs markdown on that?
Beta Was this translation helpful? Give feedback.
All reactions