diff options
author | Matt Godbolt <matt@godbolt.org> | 2017-12-21 07:57:32 -0600 |
---|---|---|
committer | Matt Godbolt <matt@godbolt.org> | 2017-12-21 07:57:32 -0600 |
commit | bd959a553b088829682de9e7a6952d08c10a2de6 (patch) | |
tree | ed8183e5680ec6538ff6e730bc60bcc3a4f4d743 /lib/compilers/golang.js | |
parent | 98e2abfea304a68a014ee905bdac3c04c4cec322 (diff) | |
parent | 69ca21d67398282f93d2a19e45aa0d3dd0ff7e33 (diff) | |
download | compiler-explorer-bd959a553b088829682de9e7a6952d08c10a2de6.tar.gz compiler-explorer-bd959a553b088829682de9e7a6952d08c10a2de6.zip |
Merge branch 'master' into unification
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 776461d04..df63bc8bf 100644 --- a/lib/compilers/golang.js +++ b/lib/compilers/golang.js @@ -34,7 +34,7 @@ function compilenewgol(info, env, langId) { 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, langId) { return res + "\t" + match[4].toLowerCase() + match[5]; } else return null; - }).filter(_.identity).join("\n"); + })).join("\n"); } compiler.postProcess = function (result, outputFilename, filters) { |