svn: /web/doc-editor/trunk/php/ File.php

From: Date: Wed, 30 Dec 2009 18:18:47 +0000
Subject: svn: /web/doc-editor/trunk/php/ File.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1451@lists.php.net to get a copy of this message
yannick Wed, 30 Dec 2009 18:18:47 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=292821 Log: Fix the regex for the diff. Thanks to gwynne and ackana@freenode#regex Changed paths: U web/doc-editor/trunk/php/File.php Modified: web/doc-editor/trunk/php/File.php =================================================================== --- web/doc-editor/trunk/php/File.php 2009-12-30 18:00:15 UTC (rev 292820) +++ web/doc-editor/trunk/php/File.php 2009-12-30 18:18:47 UTC (rev 292821) @@ -309,7 +309,7 @@ ); $output = htmlentities(join("\n", $output)); $match = array(); - preg_match_all('/@@(.*?)@@(.*(?!@@).*)/s', $output, $match); + preg_match_all('/@@([^@]+)@@(.*?)(?=@@|\z)/si', $output, $match); $diff = array(); for ($i = 0; $i < count($match[1]); $i++) {

« previous php.doc.web (#1451) next »