From: Jens Frank Date: Wed, 15 Sep 2004 05:53:21 +0000 (+0000) Subject: BUG#487 make regex not-so-greedy. If anchored to end-of-line, several lines are eaten if X-Git-Tag: 1.5.0alpha1~2005 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=7d89fde3f6731eac0375f755456a94a9d32a6434;p=lhc%2Fweb%2Fwiklou.git BUG#487 make regex not-so-greedy. If anchored to end-of-line, several lines are eaten if there is text following the comment --- 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 );