From e6c1ab047f8e31f0208a5da7241ee51401972aa0 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 27 Jan 2015 05:34:40 +0000 Subject: [PATCH] Remove copious amounts of commented out preg_replace calls Change-Id: I9b9afea3dc6729598b240845c3d34357548cdd4a --- includes/search/SearchHighlighter.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/includes/search/SearchHighlighter.php b/includes/search/SearchHighlighter.php index ec7b710c02..223a2fe4e7 100644 --- a/includes/search/SearchHighlighter.php +++ b/includes/search/SearchHighlighter.php @@ -442,12 +442,6 @@ class SearchHighlighter { * @return mixed */ function removeWiki( $text ) { - // $text = preg_replace( "/'{2,5}/", "", $text ); - // $text = preg_replace( "/\[[a-z]+:\/\/[^ ]+ ([^]]+)\]/", "\\2", $text ); - // $text = preg_replace( "/\[\[([^]|]+)\]\]/", "\\1", $text ); - // $text = preg_replace( "/\[\[([^]]+\|)?([^|]]+)\]\]/", "\\2", $text ); - // $text = preg_replace( "/\\{\\|(.*?)\\|\\}/", "", $text ); - // $text = preg_replace( "/\\[\\[[A-Za-z_-]+:([^|]+?)\\]\\]/", "", $text ); $text = preg_replace( "/\\{\\{([^|]+?)\\}\\}/", "", $text ); $text = preg_replace( "/\\{\\{([^|]+\\|)(.*?)\\}\\}/", "\\2", $text ); $text = preg_replace( "/\\[\\[([^|]+?)\\]\\]/", "\\1", $text ); @@ -456,7 +450,6 @@ class SearchHighlighter { array( $this, 'linkReplace' ), $text ); - // $text = preg_replace("/\\[\\[([^|]+\\|)(.*?)\\]\\]/", "\\2", $text); $text = preg_replace( "/<\/?[^>]+>/", "", $text ); $text = preg_replace( "/'''''/", "", $text ); $text = preg_replace( "/('''|<\/?[iIuUbB]>)/", "", $text ); -- 2.20.1