From: Mischa POSLAWSKY
Date: Sat, 15 May 2021 21:51:02 +0000 (+0200)
Subject: widget/reply: formatting syntax for ~strike~ and `code`
X-Git-Tag: v5.3~3
X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/52aab71e2268171618efe0f8f8e683b9bc5406f6
widget/reply: formatting syntax for ~strike~ and `code`
Remaining inline options in common chat systems.
---
diff --git a/upload.inc.php b/upload.inc.php
index 0ee432b..4f5c5fe 100644
--- a/upload.inc.php
+++ b/upload.inc.php
@@ -60,6 +60,8 @@ function messagehtml($input)
"/\n/" => "
\n", # newlines start paragraphs
'/_(? '$1', # italic
'/\*(? '$1', # bold
+ '/~(? '$1', # stricken
+ '/`(? '$1
', # monospace
];
$html = preg_replace(array_keys($markup), array_values($markup), htmlspecialchars($input));
return "
$html
";