Verified Commit 35ab6065 authored by Luc Didry's avatar Luc Didry

Fix bug if multiple paragraphs in a toot that need to be merged with another

parent 52053170
Pipeline #87678 passed with stages
in 1 minute and 16 seconds
......@@ -348,9 +348,11 @@ sub process_entry {
$attachments2 = $tmp_attachments2;
} else {
if ($tmp_content) {
my $tmp_dom = Mojo::DOM->new($tmp_content)->at('p')->content;
my $dom = Mojo::DOM->new($content)->at('p')->content;
$content = Mojo::DOM->new($content)->at('p')->replace("<p>$dom$tmp_dom</p>");
my $tmp_dom = $tmp_content;
my $dom = $content;
$tmp_dom =~ s#(^<p>|</p>$)##g;
$dom =~ s#(^<p>|</p>$)##g;
$content = Mojo::DOM->new("<p>$dom$tmp_dom</p>");
}
if ($attachments) {
my $tmp_dom = Mojo::DOM->new($tmp_attachments)->at('p')->content;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment