use DevHelp::HTML;
use Carp 'confess';
-our $VERSION = "1.006";
+our $VERSION = "1.007";
use constant DEBUG => 0;
1 while $part =~ s#(<(?:$all_block_tags)[^>]*>)(<(?:$all_block_tags)\b)#$1\n$2#g;
1 while $part =~ s#(</a>)(<a\s+[^>]*>)(<(?:$all_block_tags))#$1\n$2\n$3#g;
1 while $part =~ s#(<a\s+[^>]*>)(<(?:$all_block_tags))#$1\n$2#g;
+ 1 while $part =~ s#(</a>)(<(?:$all_block_tags)\b)#$1\n$2#g;
1 while $part =~ s#(>)(<hr\b[^>]*/>)#$1\n$2#g;
1 while $part =~ s#(<hr\b[^>]*/>)(<)#$1\n$2#g;
#$part =~ s!<p>(<hr[^>]*>)</p>!$1!g;
#!perl -w
use strict;
-use Test::More tests => 142;
+use Test::More tests => 143;
sub format_test($$$;$);
sub noformat_test($$$;$);
<p>bar</p>
<p>quux</p>
</a>
+OUT
+ format_test <<IN, <<OUT, "multi-p link followed by normal text", 'both';
+link[#foo|
+one
+
+two
+]
+
+normal text
+IN
+<a href="#foo">
+<p>one</p>
+<p>two</p>
+</a>
+<p>normal text</p>
OUT
format_test 'tt[hello]', '<p><tt>hello</tt></p>', 'tt';
format_test 'font[-1|text]', '<p><font size="-1">text</font></p>', 'fontsize';