From 7d89fde3f6731eac0375f755456a94a9d32a6434 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Wed, 15 Sep 2004 05:53:21 +0000 Subject: [PATCH] BUG#487 make regex not-so-greedy. If anchored to end-of-line, several lines are eaten if there is text following the comment --- includes/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 870ed18e62..d2af6df51c 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1784,7 +1784,7 @@ class Parser $htmlattrs = $this->getHTMLattrs () ; # Remove HTML comments - $text = preg_replace( '/(\\n * *(?=\\n)|)/sU', '$2', $text ); + $text = preg_replace( '/(\\n * *|)/sU', '', $text ); $bits = explode( '<', $text ); $text = array_shift( $bits ); -- 2.20.1