From: Mischa POSLAWSKY
Date: Thu, 25 Nov 2021 23:51:53 +0000 (+0100)
Subject: issue: keep image formatting after edit
X-Git-Tag: v5.4~1
X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/6bdc514b94fb0127159c809e8f311cccc230d4ee
issue: keep image formatting after edit
---
diff --git a/upload.inc.php b/upload.inc.php
index f2e101a..962bedc 100644
--- a/upload.inc.php
+++ b/upload.inc.php
@@ -63,6 +63,7 @@ function messagehtml($input)
'{<([^>\s|]+)[\s|]([^>]+)>}' => '$2', # hyperlink
"/\r\n?/" => "\n", # unix newlines
"/ +\n/" => "
", # trailing spaces for hard line break
+ '{^(/data/.*\.jpe?g)\z}m' => '', # image reference
"/^[-*] (.*)$\n?/m" => '$1', # list item
"/^(.+)$\n?/m" => "$1
\n", # paragraph
"{^(
.*)(?:
\n)?}m" => "\n", # list container