adding newline before appending tail to combinedCode to prevent tail from being cut off by trailing comments in code editor
setting initialValue of reduce to newline for arrayToNewLineString to prevent cutting off code if trailing comments in json
This commit is contained in:
@ -28,7 +28,7 @@ window.common = (function(global) {
|
|||||||
seedData = Array.isArray(seedData) ? seedData : [seedData];
|
seedData = Array.isArray(seedData) ? seedData : [seedData];
|
||||||
return seedData.reduce(function(seed, line) {
|
return seedData.reduce(function(seed, line) {
|
||||||
return '' + seed + line + '\n';
|
return '' + seed + line + '\n';
|
||||||
}, '');
|
}, '\n');
|
||||||
};
|
};
|
||||||
|
|
||||||
common.seed = common.arrayToNewLineString(common.challengeSeed);
|
common.seed = common.arrayToNewLineString(common.challengeSeed);
|
||||||
|
Reference in New Issue
Block a user