issue/activity: prevent abbreviation of subsequent images
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 6 May 2021 17:19:22 +0000 (19:19 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 8 May 2021 18:12:18 +0000 (20:12 +0200)
Fix cropped image after multiple paragraphs.

widget/issue/activity.php

index a153f872c0763d6a7670c28ec1cdfb87bd3d0039..df872ae621f7eb73b75764932a8017295bd12d86 100644 (file)
@@ -11,8 +11,8 @@ $query = $Db->query($sql);
 $rows = $query->fetchall();
 
 $msgformat = [
+       '{(.*)(<p><img [^>]+></p>)\s*}s' => "$2$1",
        "{(?=</p>\n).+}s" => ' <small class="footer">(Meer op de site)</small>',
-       '{(.*)(<p><img [^>]+></p>)\s*}s' => "$2\n$1",
        '{(?<=<img src=")(?:/thumb/[^/]+)?(?=/)}' => '/thumb/300x',
 ];