Only use multiline if the flag is passed in

This commit is contained in:
Wliu
2017-08-10 13:24:46 -04:00
parent 95b216f234
commit 8963cf4955
2 changed files with 4 additions and 3 deletions

View File

@@ -1949,7 +1949,8 @@ module.exports = class Workspace extends Model {
}
if (!outOfProcessFinished.length) {
let flags = 'gm' // set multiline flag so ^ and $ match start/end of line, not file
let flags = 'g'
if (regex.multiline) { flags += 'm' }
if (regex.ignoreCase) { flags += 'i' }
const task = Task.once(