Permalink
Browse files

Merge pull request #2 from rdtriny/patch-1

The 43rd line, which is to trim spaces left and right, but missed global...
  • Loading branch information...
digitarald committed Nov 3, 2012
2 parents 79325f8 + 6f74092 commit 09bff6958193ee265ac7157edca274f43a903bb1
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 09bff69

Please sign in to comment.