Set regexp multiline in find/replace extension. Fixes #610
This commit is contained in:
parent
4c7cb8c0a4
commit
88551b3c26
@ -105,7 +105,7 @@ define([
|
|||||||
var textLength = text.length;
|
var textLength = text.length;
|
||||||
if(textLength) {
|
if(textLength) {
|
||||||
try {
|
try {
|
||||||
var flags = caseSensitive ? 'g' : 'gi';
|
var flags = caseSensitive ? 'gm' : 'gmi';
|
||||||
text = useRegexp ? text : text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
text = useRegexp ? text : text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||||
regex = new RegExp(text, flags);
|
regex = new RegExp(text, flags);
|
||||||
editor.getValue().replace(regex, function(match, offset) {
|
editor.getValue().replace(regex, function(match, offset) {
|
||||||
|
Loading…
Reference in New Issue
Block a user