clean up another anchor nesting edge case
authorAdrian Oldham <adriann@visualthought.com.au>
Mon, 21 Oct 2013 04:47:33 +0000 (15:47 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Nov 2013 23:20:22 +0000 (10:20 +1100)
site/cgi-bin/modules/DevHelp/Formatter.pm

index 9ae9accd167d5117235c6593753fd25fa1124174..2ce8d40ba2f431c3789e78e32cb8f91f8379acc0 100644 (file)
@@ -382,6 +382,7 @@ sub format {
       1 while $part =~ s!</figcaption></p>!</p></figcaption>!g;
       1 while $part =~ s!<p>(<a\s[^>]+>)</p>!$1!g;
       1 while $part =~ s!<p></a></p>!</a>!g;
+      1 while $part =~ s! ?(<a\s[^>]+>)</p>!</p>\n$1!g;
       $part =~ s!<p>(<hr[^>]*>)</p>!$1!g;
       $part =~ s!<p>(<(?:table|ol|ul|center|h[1-6])[^>]*>)!$1!g;
       $part =~ s!(</(?:table|ol|ul|center|h[1-6])>)</p>!$1!g;