Debian Codegraph @

t/400-opt-inline_delimiters_max_run_length.t

raw
1 use strict;
2 use warnings;
3 use utf8;
4
5 use Markdown::Perl 'convert';
6 use Test2::V0;
7
8 # Ideally this would be tested by the GitHub test suite for which this is
9 # implemented but, as of writing, the cmark-gfm repo lags behind the public
10 # documentation for that syntax.
11 is(convert("***test***"), "<p><em><strong>test</strong></em></p>\n", 'default');
12 is(convert("***test***", inline_delimiters_max_run_length => {'*' => 3}), "<p><em><strong>test</strong></em></p>\n", 'max_length_3');
13 is(convert("***test***", inline_delimiters_max_run_length => {'*' => 2}), "<p>***test***</p>\n", 'max_length_2');
14
15 done_testing;