From 4a5f18e58d133e59d1e30048204863decc698401 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 15 Dec 2013 14:55:39 +0100 Subject: [PATCH] Use a better regular expression to find documented hooks in findHooks.php Added a ":" after the second quote so that only strings in the form 'Hook': are matched, otherwise the line 1172 of hooks.txt provoques the the following message: Documented and not found: value because the line starts with 'value'. Change-Id: I1d603e3fa10dcabf25e31f6a71aad233571738b5 --- maintenance/findHooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index a936436455..24b23d9976 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -142,7 +142,7 @@ class FindHooks extends Maintenance { private function getHooksFromLocalDoc( $doc ) { $m = array(); $content = file_get_contents( $doc ); - preg_match_all( "/\n'(.*?)'/", $content, $m ); + preg_match_all( "/\n'(.*?)':/", $content, $m ); return array_unique( $m[1] ); } -- 2.20.1