mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Allow for case insensitive project.scan searches
This commit is contained in:
parent
e509e23a0f
commit
82de7009d5
@ -279,6 +279,14 @@ describe "Project", ->
|
|||||||
expect(paths[3]).toMatch /quote".txt$/m
|
expect(paths[3]).toMatch /quote".txt$/m
|
||||||
expect(path.basename(paths[4])).toBe "utfa\u0306.md"
|
expect(path.basename(paths[4])).toBe "utfa\u0306.md"
|
||||||
|
|
||||||
|
it "ignores case if the regex includes the `i` flag", ->
|
||||||
|
matches = []
|
||||||
|
waitsForPromise ->
|
||||||
|
project.scan /DOLLAR/i, (match) -> matches.push(match)
|
||||||
|
|
||||||
|
runs ->
|
||||||
|
expect(matches).toHaveLength 1
|
||||||
|
|
||||||
it "handles breaks in the search subprocess's output following the filename", ->
|
it "handles breaks in the search subprocess's output following the filename", ->
|
||||||
spyOn(BufferedProcess.prototype, 'bufferStream')
|
spyOn(BufferedProcess.prototype, 'bufferStream')
|
||||||
|
|
||||||
|
@ -337,6 +337,7 @@ class Project
|
|||||||
args = ['--hidden', '--ackmate', regex.source, @getPath()]
|
args = ['--hidden', '--ackmate', regex.source, @getPath()]
|
||||||
ignoredNames = config.get('core.ignoredNames') ? []
|
ignoredNames = config.get('core.ignoredNames') ? []
|
||||||
args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0
|
args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0
|
||||||
|
args.unshift('--ignoreCase') if regex.ignoreCase
|
||||||
args.unshift('--addVCSIgnores') if config.get('core.excludeVcsIgnoredPaths')
|
args.unshift('--addVCSIgnores') if config.get('core.excludeVcsIgnoredPaths')
|
||||||
new BufferedNodeProcess({command, args, stdout, stderr, exit})
|
new BufferedNodeProcess({command, args, stdout, stderr, exit})
|
||||||
deferred
|
deferred
|
||||||
|
Loading…
Reference in New Issue
Block a user