<commit_before># Force the test runner to ensure the extension is loaded
!! hooks
poem
!! endhooks

#Regression tests for existing functionality, to ensure nothing was broken.
!! test
<poem>
!! input
<poem>
this
is
a
test
</poem>
!! result
<div class="poem">
<p>this<br />
is<br />
a<br />
test
</p>
</div>

!! end

!!test
  <poem> with recursive parsing
!!input
<poem>
this ''is'' a '''test'''
</poem>
!! result
<div class="poem">
<p>this <i>is</i> a <b>test</b>
</p>
</div>

!!end


!!test
  <poem> with leading whitespace
!!input
<poem>

   test

</poem>
!! result
<div class="poem">
<p><br />
&nbsp;&nbsp;&nbsp;test<br />
</p>
</div>

!!end

!!test
Horizontal rule
!!input
<poem>
some
-----
text
</poem>
!!result
<div class="poem">
<p>some<br />
</p>
<hr /><br />
<p>text
</p>
</div>

!!end

#test for new poem/nowiki feature; should fail without new enhancement.
!! test 2
example of <nowiki> without <poem>
!!options
disabled
!! input<commit_msg>Fix Poem parser tests from r67090<commit_after># Force the test runner to ensure the extension is loaded
!! hooks
poem
!! endhooks

#Regression tests for existing functionality, to ensure nothing was broken.
!! test
<poem>
!! input
<poem>
this
is
a
test
</poem>
!! result
<div class="poem">
<p>this<br />
is<br />
a<br />
test
</p>
</div>

!! end

!!test
  <poem> with recursive parsing
!!input
<poem>
this ''is'' a '''test'''
</poem>
!! result
<div class="poem">
<p>this <i>is</i> a <b>test</b>
</p>
</div>

!!end


!!test
  <poem> with leading whitespace
!!input
<poem>

   test

</poem>
!! result
<div class="poem">
<p><br />
&#160;&#160;&#160;test<br />
</p>
</div>

!!end

!!test
Horizontal rule
!!input
<poem>
some
-----
text
</poem>
!!result
<div class="poem">
<p>some<br />
</p>
<hr /><br />
<p>text
</p>
</div>

!!end

#test for new poem/nowiki feature; should fail without new enhancement.
!! test 2
example of <nowiki> without <poem>
!!options
disabled
!! input
{'fraction_non_alphanumeric': 0.20426195426195426, 'fraction_numerical': 0.008316008316008316, 'mean_word_length': 4.039267015706806, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1027303', 'n_tokens_mistral': 794, 'n_tokens_neox': 772, 'n_words': 246}