From f9c8f7c11b72ba5da24b444bbcbfe186a8133cab Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 22 Apr 2012 12:55:26 +0400 Subject: [PATCH] allow passing regexp as a needle for search --- lib/ace/search.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ace/search.js b/lib/ace/search.js index 846f3905..e6a6f922 100644 --- a/lib/ace/search.js +++ b/lib/ace/search.js @@ -275,6 +275,9 @@ Search.SELECTION = 2; }; this.$assembleRegExp = function() { + if (typeof this.$options.needle != 'string') + return this.$options.needle; + if (this.$options.regExp) { var needle = this.$options.needle; } else {