#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 13; use MarkdownParser; my $parser = MarkdownParser->new(); is( $parser->parse("**bold text**"), "

bold text

\n", "Bold with **" ); is( $parser->parse("__bold text__"), "

bold text

\n", "Bold with __" ); is( $parser->parse("*italic text*"), "

italic text

\n", "Italic with *" ); is( $parser->parse("_italic text_"), "

italic text

\n", "Italic with _" ); is( $parser->parse("**bold** and *italic*"), "

bold and italic

\n", "Bold and italic together" ); is( $parser->parse("Text with **bold** in middle"), "

Text with bold in middle

\n", "Bold in middle of text" ); is( $parser->parse("Text with *italic* in middle"), "

Text with italic in middle

\n", "Italic in middle of text" ); is( $parser->parse("**bold** *italic* **bold again**"), "

bold italic bold again

\n", "Multiple formatting" ); is( $parser->parse("***bold text***"), "

bold text

\n", "Bold with ***" ); is( $parser->parse("**bold *italic* bold**"), "

bold italic bold

\n", "Nested formatting" ); is( $parser->parse("___bold text___"), "

bold text

\n", "Bold with ___" ); is( $parser->parse("my_variable"), "

my_variable

\n", "Underscore inside word unchanged" ); is( $parser->parse("CONST__VALUE"), "

CONST__VALUE

\n", "Double underscores inside word unchanged" );