Permalink
Browse files

The 43rd line, which is to trim spaces left and right, but missed glo…

…bal tag:'g', so I added it to the source. Hope the author notes this and correct it,if I am right. :-)
  • Loading branch information...
rdtriny committed Jan 5, 2012
1 parent 79325f8 commit 6f7409204cb7ef989d2d70cbf92238a66b73f57b
Showing with 1 addition and 1 deletion.
  1. +1 −1 Sly.js
View
2 Sly.js
@@ -40,7 +40,7 @@ var cache = {};
*/
var Sly = function(text, context, results, options) {
// normalise
text = (typeof(text) == 'string') ? text.replace(/^\s+|\s+$/, '') : '';
text = (typeof(text) == 'string') ? text.replace(/^\s+|\s+$/g, '') : '';
var cls = cache[text] || (cache[text] = new Sly.initialize(text));
return (context == null) ? cls : cls.search(context, results, options);

0 comments on commit 6f74092

Please sign in to comment.