#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 4; use MarkdownParser; my $parser = MarkdownParser->new(); my $input = <<'EOF'; # Title This is a paragraph with **bold** and *italic* text. - List item 1 - List item 2 [Link](http://example.com) EOF my $expected = <<'EOF';
This is a paragraph with bold and italic text.
Paragraph one.
Blockquote here
Another paragraph.
EOF is( $parser->parse($input), $expected, "Document with blockquote" ); $input = <<'EOF'; # Code Example Here is some `inline code` and a code block: ``` function test() { return true; } ``` EOF $expected = <<'EOF';Here is some inline code and a code block:
function test() {
return true;
}
EOF
is( $parser->parse($input), $expected, "Document with code" );
$input = <<'EOF';
# Header
Paragraph with [link](url) and .
---
## Another Header
EOF
$expected = <<'EOF';
Paragraph with link and
.