Make ugly regex slightly less ugly. You don't have to use / for the delimiter.
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:07:10 +0000 (01:07 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:07:10 +0000 (01:07 +0000)
includes/Linker.php

index 578cd09..f293a89 100644 (file)
@@ -842,7 +842,7 @@ class Linker {
         */
        private function formatAutocomments( $comment, $title = NULL, $local = false ) {
                $match = array();
-               while (preg_match('/(.*)\/\*\s*(.*?)\s*\*\/(.*)/', $comment,$match)) {
+               while (preg_match('!(.*)/\*\s*(.*?)\s*\*/(.*)!', $comment,$match)) {
                        $pre=$match[1];
                        $auto=$match[2];
                        $post=$match[3];