svn: /pear/pearweb/trunk/cron/ find-documentation.php
| From: | David JEAN LOUIS | Date: | Mon, 12 Apr 2010 09:09:33 +0000 |
| Subject: | svn: /pear/pearweb/trunk/cron/ find-documentation.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9373@lists.php.net to get a copy of this message | ||
izi Mon, 12 Apr 2010 09:09:33 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297868
Log:
More robust regexes, now handle multine tags. This should fix the documentation links problem on
pearweb.
Changed paths:
U pear/pearweb/trunk/cron/find-documentation.php
Modified: pear/pearweb/trunk/cron/find-documentation.php
===================================================================
--- pear/pearweb/trunk/cron/find-documentation.php 2010-04-12 08:40:59 UTC (rev 297867)
+++ pear/pearweb/trunk/cron/find-documentation.php 2010-04-12 09:09:33 UTC (rev 297868)
@@ -88,8 +88,8 @@
$path = $basepath . $folder . '/' . $file['name'];
$content = file_get_contents($path);
- preg_match("/<title>(.*)<\/title>/", $content, $matches1);
- preg_match("/<book.*xml:id\=\"(.*)\">/", $content,
$matches2);
+ preg_match("/<title>\s*(\w+)\s*<\/title>/s", $content,
$matches1);
+ preg_match("/<book.*?xml:id\=\"(.*?)\"\s*>/s", $content,
$matches2);
$url = '/manual/en/' . $matches2[1] . '.php';
@@ -111,4 +111,4 @@
// }}}
-readFolder('.');
\ No newline at end of file
+readFolder('.');