From 9a392c9548b3fedc5128a6a6c3ca6e5950e6c3bd Mon Sep 17 00:00:00 2001 From: Ivan Date: Fri, 16 May 2014 17:29:39 +0400 Subject: [PATCH] Fix bug using PCRE_MULTILINE with a caret Replace RN to N for patterns with PCRE_MULTILINE modifier. --- wiky.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wiky.inc.php b/wiky.inc.php index e00f3ff..5e93fb9 100644 --- a/wiky.inc.php +++ b/wiky.inc.php @@ -15,6 +15,8 @@ class wiky { public function __construct($analyze=false) { $this->patterns=array( + "/\r\n/", + // Headings "/^==== (.+?) ====$/m", // Subsubheading "/^=== (.+?) ===$/m", // Subheading @@ -57,6 +59,8 @@ public function __construct($analyze=false) { "/^[^><\n\r]+$/m", // Ones with no elements ); $this->replacements=array( + "\n", + // Headings "

$1

", "

$1

",