#!/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';

Title

This is a paragraph with bold and italic text.

Link

EOF is( $parser->parse($input), $expected, "Complex document" ); $input = <<'EOF'; ## Section Paragraph one. > Blockquote here Another paragraph. EOF $expected = <<'EOF';

Section

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';

Code Example

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 ![image](img.png). --- ## Another Header EOF $expected = <<'EOF';

Header

Paragraph with link and image.


Another Header

EOF is( $parser->parse($input), $expected, "Document with links, images, and horizontal rule" );