test: add underscores-in-words regression tests for emphasis

This commit is contained in:
2025-12-11 16:38:20 +01:00
parent 6670e81640
commit da24af38e3

View File

@@ -2,7 +2,7 @@
use strict; use strict;
use warnings; use warnings;
use Test::More tests => 11; use Test::More tests => 13;
use MarkdownParser; use MarkdownParser;
my $parser = MarkdownParser->new(); my $parser = MarkdownParser->new();
@@ -62,4 +62,7 @@ is(
"<p><strong>bold text</strong></p>\n", "<p><strong>bold text</strong></p>\n",
"Bold with ___" "Bold with ___"
); );
is( $parser->parse("my_variable"),
"<p>my_variable</p>\n", "Underscore inside word unchanged" );
is( $parser->parse("CONST__VALUE"),
"<p>CONST__VALUE</p>\n", "Double underscores inside word unchanged" );