r78887 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78886‎ | r78887 | r78888 >
Date:14:16, 23 December 2010
Author:catrope
Status:ok
Tags:
Comment:
Fix JS errors thrown by SimpleSearch: add dependency from jquery.autoEllipsis to jquery.highlightText, and fix the latter for the RegExp.escape() -> $.escapeRE() rename
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.highlightText.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.highlightText.js
@@ -23,7 +23,7 @@
2424 // TODO - need to be smarter about the character matching here.
2525 // non latin characters can make regex think a new word has begun.
2626 // look for an occurence of our pattern and store the starting position
27 - var pos = node.data.search( new RegExp( "\\b" + RegExp.escape( pat ), "i" ) );
 27+ var pos = node.data.search( new RegExp( "\\b" + $.escapeRE( pat ), "i" ) );
2828 if ( pos >= 0 ) {
2929 // create the span wrapper for the matched text
3030 var spannode = document.createElement( 'span' );
Index: trunk/phase3/resources/Resources.php
@@ -45,7 +45,8 @@
4646 'scripts' => 'resources/jquery/jquery.async.js'
4747 ),
4848 'jquery.autoEllipsis' => array(
49 - 'scripts' => 'resources/jquery/jquery.autoEllipsis.js'
 49+ 'scripts' => 'resources/jquery/jquery.autoEllipsis.js',
 50+ 'dependencies' => 'jquery.highlightText',
5051 ),
5152 'jquery.checkboxShiftClick' => array(
5253 'scripts' => 'resources/jquery/jquery.checkboxShiftClick.js'

Follow-up revisions

RevisionCommit summaryAuthorDate
r79129MFT r78011 r78014 r78015 r78016 r78099 r78117 r78161 r78170 r78172 r78199 r78......platonides19:58, 28 December 2010

Status & tagging log