remove any whitespace before closing paras
authorAdrian Oldham <adriann@visualthought.com.au>
Thu, 24 Oct 2013 22:33:51 +0000 (09:33 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Nov 2013 23:20:24 +0000 (10:20 +1100)
site/cgi-bin/modules/DevHelp/Formatter.pm

index fde34444088ba5924c9c67738fdf4348df994d00..e409809b0d92ca89b8612f20c64af32982f434e0 100644 (file)
@@ -422,6 +422,7 @@ sub format {
       $part =~ s#[\x02\x03]##g;
       1 while $part =~ s/<p>(<div(?: [^>]*)?>)/$1\n<p>/g;
       1 while $part =~ s!</div></p>!</p>\n</div>!g;
+      1 while $part =~ s!\s+?</p>!</p>!g;
       #1 while $part =~ s/<p>(<address(?: [^>]*)?>)/$1\n<p>/g;
       #1 while $part =~ s!</address></p>!</p>\n</address>!g;
       #1 while $part =~ s/<p>(<blockquote(?: [^>]*)?>)/$1\n<p>/g;