From: Tim Düsterhus Date: Fri, 17 Jun 2022 07:50:25 +0000 (+0200) Subject: Flarum: Force any line breaks to be hard line breaks X-Git-Tag: 5.5.0_RC_2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f47c9ff76faf9c123bdedb1532c4f62216966f4;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Flarum: Force any line breaks to be hard line breaks Apparently Flarum's Markdown flavor interprets all line breaks within the entered text content as hard breaks, instead of soft wrapping of the source. --- diff --git a/files/lib/system/exporter/Flarum1xExporter.class.php b/files/lib/system/exporter/Flarum1xExporter.class.php index 014076a..23861df 100644 --- a/files/lib/system/exporter/Flarum1xExporter.class.php +++ b/files/lib/system/exporter/Flarum1xExporter.class.php @@ -727,6 +727,9 @@ final class Flarum1xExporter extends AbstractExporter '[/center]' => '[/align]', ]); + + $message = \preg_replace("/\r?\n/", ' \\0', $message); + $out = $parsedown->text($message); $out = \preg_replace(