Skip to content

Instantly share code, notes, and snippets.

@scriplit
Created June 9, 2014 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriplit/7c9e86d0a8361dc41aa9 to your computer and use it in GitHub Desktop.
Save scriplit/7c9e86d0a8361dc41aa9 to your computer and use it in GitHub Desktop.
Perl6: read strings from file & convert with Text::Markdown

bold and italic

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