bold and italic
Created
June 9, 2014 09:12
-
-
Save scriplit/7c9e86d0a8361dc41aa9 to your computer and use it in GitHub Desktop.
Perl6: read strings from file & convert with Text::Markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use Text::Markdown; | |
say "From embedded string:"; | |
my $doc = "**bold** and *italic*"; | |
my $md = parse-markdown($doc); | |
say $md.to_html; | |
say "From file:"; | |
$doc = slurp('md-file.md'); | |
$md = parse-markdown($doc); | |
say $md.to_html; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment