mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
do not wrap regular expresssions in '^' and '$', only strings.
This commit is contained in:
1 parent
37f4ffd324
commit
fccdb12b02
3 files changed
+6
-3
No files matched your search
@@ -106,14 +106,16 @@ define(function (require, exports, module) {
|
||||
// since we know it is a wildcard.
|
||||
value = value.replace("\\?", ".?");
|
||||
value = value.replace("\\*", ".*");
|
||||
|
||||
// Add "^" and "$" to prevent matching in the middle of strings.
|
||||
value = "^" + value + "$";
|
||||
}
|
||||
|
||||
if (index > 0) {
|
||||
regExpString += "|";
|
||||
}
|
||||
|
||||
// Add "^" and "$" to prevent matching in the middle of strings.
|
||||
regExpString = regExpString.concat("^" + value + "$");
|
||||
regExpString = regExpString.concat(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user