Merge "Gallery: Use intrinsic width for gallery to center caption"
[lhc/web/wiklou.git] / maintenance / findHooks.php
index 7304a2a..c91d824 100644 (file)
@@ -244,11 +244,11 @@ class FindHooks extends Maintenance {
                                // Comma for second argument
                                '(?:\s*(,))?' .
                                // Second argument must start with array to be processed
-                               '(?:\s*array\s*\(' .
+                               '(?:\s*(?:array\s*\(|\[)' .
                                // Matching inside array - allows one deep of brackets
-                               '((?:[^\(\)]|\([^\(\)]*\))*)' .
+                               '((?:[^\(\)\[\]]|\((?-1)\)|\[(?-1)\])*)' .
                                // End
-                               '\))?/',
+                               '[\)\]])?/',
                        $content,
                        $m,
                        PREG_SET_ORDER