diff options
author | Christian Vonrüti <christian@vonrueti.ch> | 2019-06-08 02:39:06 +0200 |
---|---|---|
committer | Christian Vonrüti <christian@vonrueti.ch> | 2019-06-08 02:39:23 +0200 |
commit | 1a591e4a83ebbf41d3a32c21879fdad6cfdc9185 (patch) | |
tree | bdeb54f797c64bac22ce7b30d7f881c82fe6738f /lib/compilers/java.js | |
parent | ba66aaa91c97f022668f3e49988c6cfb905b8b81 (diff) | |
download | compiler-explorer-1a591e4a83ebbf41d3a32c21879fdad6cfdc9185.tar.gz compiler-explorer-1a591e4a83ebbf41d3a32c21879fdad6cfdc9185.zip |
Separate java classes with 2 newlines in compiler output view
Diffstat (limited to 'lib/compilers/java.js')
-rw-r--r-- | lib/compilers/java.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compilers/java.js b/lib/compilers/java.js index 66e53307c..de5a514d4 100644 --- a/lib/compilers/java.js +++ b/lib/compilers/java.js @@ -144,7 +144,12 @@ class JavaCompiler extends BaseCompiler { parseds.sort((o1, o2) => o1.firstSourceLine - o2.firstSourceLine); const segments = []; - parseds.forEach(parsed => { + parseds.forEach((parsed, classNumber) => { + if (classNumber > 0) { + // Separate classes with two line breaks + segments.push({text: "", source: null}); + segments.push({text: "", source: null}); + } for (let i = 0; i < parsed.textsBeforeMethod.length; i++) { // Line-based highlighting doesn't work if some segments span multiple lines, // even if they don't have a source line number |