From: Brion Vibber Date: Thu, 3 Nov 2005 23:27:36 +0000 (+0000) Subject: * (bug 918) Search index incorrectly joined words at == headings == X-Git-Tag: 1.6.0~1225 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=58a50e0268e861e85f74ae1317783e5095dfa188;p=lhc%2Fweb%2Fwiklou.git * (bug 918) Search index incorrectly joined words at == headings == --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 467cc62c56..2b9ae8f92d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -201,6 +201,7 @@ fully support the editing toolbar, but was found to be too confusing. * changed directory hierarchy in images/math/. System upgrades from old to new hierarchy on the fly. * (bug 3487) Fix category edit preview with preview-on-bottom +* (bug 918) Search index incorrectly joined words at == headings == === Caveats === diff --git a/includes/SearchUpdate.php b/includes/SearchUpdate.php index d64d53d8a3..3396eb9d09 100644 --- a/includes/SearchUpdate.php +++ b/includes/SearchUpdate.php @@ -54,8 +54,8 @@ class SearchUpdate { wfProfileIn( $fname.'-regexps' ); $text = preg_replace( "/<\\/?\\s*[A-Za-z][A-Za-z0-9]*\\s*([^>]*?)>/", ' ', strtolower( " " . $text /*$this->mText*/ . " " ) ); # Strip HTML markup - $text = preg_replace( "/(^|\\n)\\s*==\\s+([^\\n]+)\\s+==\\s/sD", - "\\2 \\2 \\2 ", $text ); # Emphasize headings + $text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD", + "\\1\\2 \\2 \\2\\3", $text ); # Emphasize headings # Strip external URLs $uc = "A-Za-z0-9_\\/:.,~%\\-+&;#?!=()@\\xA0-\\xFF";