Skip to content

Commit

Permalink
Fix passing code read from standard input to the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
fstirlitz committed Dec 18, 2019
1 parent ee02972 commit af602e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/luaparse
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else {
// @TODO doesn't work in node 0.9.4-0.9.11 because `end` is never emitted.
stdin.setEncoding('utf8');
stdin.on('data', function(chunk) { input += chunk; });
stdin.on('end', function() { snippets.unshift(input.trim()); done(); });
stdin.on('end', function() { snippets.unshift({ code: input }); done(); });
stdin.resume();
}

Expand Down

0 comments on commit af602e1

Please sign in to comment.