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

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Wed, 30 Dec 2009 01:04:39 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292785

Log:
Fix regex to parse diff receive from VCS

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 00:45:32 UTC (rev 292784)
+++ web/doc-editor/trunk/php/File.php	2009-12-30 01:04:39 UTC (rev 292785)
@@ -308,9 +308,8 @@
             $this->name, $rev1, $rev2
         );
         $output = htmlentities(join("\n", $output));
-
         $match = array();
-        preg_match_all('/@@(.*?)@@(.[^@@]*)/s', $output, $match);
+        preg_match_all('/@@(.*?)@@(.*(?!@@).*)/s', $output, $match);

         $diff = array();
         for ($i = 0; $i < count($match[1]); $i++) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.