From 346f72be058ee6c4a72b4490deee6f5d4e896545 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 7 Nov 2014 12:32:48 +1100 Subject: [PATCH] ensure files end with a newline --- lib/6to5/file.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/6to5/file.js b/lib/6to5/file.js index 17ecaaf143..0da0505506 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -98,6 +98,8 @@ File.prototype.errorWithNode = function (node, msg) { File.prototype.parse = function (code) { var self = this; + code = code.trimRight() + "\n"; + this.code = code; code = this.parseShebang(code);