Cleaner presentation of patches

This commit is contained in:
Tony Garnock-Jones 2016-08-07 19:43:21 -04:00
parent 7f785008c8
commit cd754be396
2 changed files with 4 additions and 4 deletions

View File

@ -223,9 +223,9 @@ Patch.prototype.projectObjects = function (compiledProjection) {
};
Patch.prototype.pretty = function () {
return ("<<<<<<<< Removed:\n" + Trie.prettyTrie(this.removed) + "\n" +
"======== Added:\n" + Trie.prettyTrie(this.added) + "\n" +
">>>>>>>>");
return ("\n" +
"-" + Trie.prettyTrie(this.removed, { lineSep: "\n-" }) + "\n" +
"+" + Trie.prettyTrie(this.added, { lineSep: "\n+" }) + "\n");
};
// Completely ignores success-values in t.

View File

@ -837,7 +837,7 @@ function prettyTrie(m, optionsOpt) {
.sortBy(function (k, key) { return key })
.forEach(function (k, key) {
if (needSep) {
acc.push("\n");
acc.push(options.lineSep || "\n");
acc.push(indentStr(i));
} else {
needSep = true;