Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/plato.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ exports.inspect = function(files, outputDir, options, done) {

var fileShort = file.replace(commonBasePath, '');
var fileSafe = fileShort.replace(/[^a-zA-Z0-9]/g,'_');
var source = fs.readFileSync(file).toString().trim();
if (!source) {
var source = fs.readFileSync(file).toString();
if (!source.trim()) {
log.info('Not parsing empty file "%s"', file);
return;
}

// if skip empty line option
if(options.noempty) {
source = source.replace(/^\s*[\r\n]/gm ,"");
source = source.replace(/^\s*[\r\n]/gm ,"").trim();
}

// if begins with shebang
Expand Down