Comparing version 0.5.1 to 0.5.2
@@ -121,4 +121,4 @@ module.exports = function(options, progressCallback) { | ||
var data = fs.readFileSync(filePath, 'utf8'), | ||
matches = domtosource.find(data, options.selector), | ||
matchesLen = matches.length, | ||
matches = [], | ||
matchesLen, | ||
matchesDetails = [], | ||
@@ -128,2 +128,7 @@ i, | ||
if (data && options.selector) { | ||
matches = domtosource.find(data, options.selector); | ||
} | ||
matchesLen = matches.length; | ||
if (matchesLen > 0) { | ||
@@ -130,0 +135,0 @@ numberOfFilesWithMatches += 1; |
{ | ||
"name": "elfinder", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Command line app for searching in HTML files for elements that match a CSS selector", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -40,4 +40,4 @@ # Element Finder | ||
## Sublime Text Package | ||
## Atom package | ||
There is also a Sublime Text package. More info at https://github.com/keeganstreet/sublime-elfinder | ||
There is a package for Atom which is easier to use than the command line app. More info at https://github.com/keeganstreet/atom-element-finder |
@@ -24,2 +24,8 @@ var CLIeasy = require('cli-easy'), | ||
.discuss('searching an empty file') | ||
.arg('-s "li"') | ||
.arg('-f test/example-html/empty.html') | ||
.expect('should find 0 matches in 0 files', /Found 0 matches in 0 files./) | ||
.undiscuss() | ||
.arg('-d test/example-html') | ||
@@ -26,0 +32,0 @@ |
146469
15
324