]> git.imager.perl.org - bse.git/commitdiff
handle newlines when converting <p><span...>...</span></p> to <p ...></p>
authorTony Cook <tony@develop-help.com>
Fri, 27 May 2016 09:07:30 +0000 (19:07 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 27 May 2016 09:07:57 +0000 (19:07 +1000)
site/cgi-bin/modules/DevHelp/Formatter.pm

index 4af8f7256b2565774e45741603c62bc084e570a4..e2c01182ca0e993cd27b0e13720e9798dbf2e0d9 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use DevHelp::HTML;
 use Carp 'confess';
 
-our $VERSION = "1.011";
+our $VERSION = "1.012";
 
 use constant DEBUG => 0;
 
@@ -453,9 +453,9 @@ sub format {
       # attempts to convert class[name|paragraph] into <p class="name">...
       # tried to use a negative lookahead but it wouldn't work
       $part =~ s#<(p\b[^>]*)><span\ class="([^"<>]+)">(.*?)</span></p>
-               #<$1 class="$2">$3</p>#xg;
+               #<$1 class="$2">$3</p>#xgs;
       $part =~ s#<(p\b[^>]*)><span\ style="([^"<>]+)">(.*?)</span></p>
-               #<$1 style="$2">$3</p>#xg;
+               #<$1 style="$2">$3</p>#xgs;
       if (my $p_class = $self->tag_class('p')) {
        $part =~ s!(<p(?: style="[^"<>]+")?)>!$1 class="$p_class">!g;
       }