diff options
Diffstat (limited to 'lib/compilers/golang.js')
-rw-r--r-- | lib/compilers/golang.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compilers/golang.js b/lib/compilers/golang.js index 4afb4dfbf..18a299f17 100644 --- a/lib/compilers/golang.js +++ b/lib/compilers/golang.js @@ -34,7 +34,7 @@ function compilenewgol(info, env) { let prevLine = null; let file = null; let fileCount = 0; - return code.map(function (obj) { + return _.compact(code.map(function (obj) { const line = obj.text; const match = line.match(re); if (match) { @@ -51,7 +51,7 @@ function compilenewgol(info, env) { return res + "\t" + match[4].toLowerCase() + match[5]; } else return null; - }).filter(_.identity).join("\n"); + })).join("\n"); } compiler.postProcess = function (result, outputFilename, filters) { |