Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion t/markdown.t
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ my $angle_link_dom = Mojo::DOM->new($angle_link);
my $ahref = $angle_link_dom->at('a[href]');
is($ahref->attr('href'), 'https://searchfox.org/mozilla-central/rev/76fe4bb385348d3f45bbebcf69ba8c7283dfcec7/mobile/android/base/java/org/mozilla/gecko/toolbar/SecurityModeUtil.java#101', 'angle links are parsed properly');

is($parser->render_html('<foo>'), "<p>&lt;foo&gt;</p>\n", "literal tags work");
# Test that literal tags are not parsed as HTML, but are instead escaped.
# Need to use a tag that is not likely to get used in a real use case,
# because the bug_format_comment extension hook is allowed to arbitrarily
# modify the comment text, and we don't want to accidentally break a real
# use case where the tag contents might get modified and break our test.
is(
$parser->render_html('<markdownliteraltesttoken>'),
"<p>&lt;markdownliteraltesttoken&gt;</p>\n",
'literal tags work'
);

done_testing;
Loading