From 77c0ea7f578e51d3fc531f80c43821ddecd75ae8 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 21 Nov 2013 14:56:45 +0100 Subject: [PATCH] Markdown: better
placement --- src/CustomMarkdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CustomMarkdown.php b/src/CustomMarkdown.php index fa2eeba3..6b8e3e5c 100644 --- a/src/CustomMarkdown.php +++ b/src/CustomMarkdown.php @@ -43,7 +43,7 @@ class CustomMarkdown extends \Michelf\Markdown protected function doHardBreaks($text) { - return preg_replace_callback('/\n/', [&$this, '_doHardBreaks_callback'], $text); + return preg_replace_callback('/\n(?=[\[\]\(\)\w])/', [&$this, '_doHardBreaks_callback'], $text); } protected function doStrike($text)