| Index: trunk/phase3/resources/jquery/jquery.suggestions.js |
| — | — | @@ -229,7 +229,7 @@ |
| 230 | 230 | } else { |
| 231 | 231 | result = selected.prev(); |
| 232 | 232 | if ( selected.length == 0 ) { |
| 233 | | - // we are at the begginning, so lets jump to the last item |
| | 233 | + // we are at the beginning, so lets jump to the last item |
| 234 | 234 | if ( context.data.$container.find( '.suggestions-special' ).html() != "" ) { |
| 235 | 235 | result = context.data.$container.find( '.suggestions-special' ); |
| 236 | 236 | } else { |
| Index: trunk/phase3/resources/jquery/jquery.autoEllipsis.js |
| — | — | @@ -5,7 +5,7 @@ |
| 6 | 6 | |
| 7 | 7 | // Cache ellipsed substrings for every string-width-position combination |
| 8 | 8 | var cache = { }; |
| 9 | | -// Use a seperate cache when match highlighting is enabled |
| | 9 | +// Use a separate cache when match highlighting is enabled |
| 10 | 10 | var matchTextCache = { }; |
| 11 | 11 | |
| 12 | 12 | $.fn.autoEllipsis = function( options ) { |
| Index: trunk/phase3/resources/jquery/jquery.highlightText.js |
| — | — | @@ -21,9 +21,10 @@ |
| 22 | 22 | // if this is a text node |
| 23 | 23 | if ( node.nodeType == 3 ) { |
| 24 | 24 | // TODO - need to be smarter about the character matching here. |
| 25 | | - // non latin characters can make regex think a new word has begun. |
| 26 | | - // look for an occurence of our pattern and store the starting position |
| 27 | | - var pos = node.data.search( new RegExp( "\\b" + $.escapeRE( pat ), "i" ) ); |
| | 25 | + // non latin characters can make regex think a new word has begun: do not use \b |
| | 26 | + // http://stackoverflow.com/questions/3787072/regex-wordwrap-with-utf8-characters-in-js |
| | 27 | + // look for an occurence of our pattern and store the starting position |
| | 28 | + var pos = node.data.search( new RegExp( "(^|\\s)" + $.escapeRE( pat ), "i" ) ); |
| 28 | 29 | if ( pos >= 0 ) { |
| 29 | 30 | // create the span wrapper for the matched text |
| 30 | 31 | var spannode = document.createElement( 'span' ); |