Cleaner presentation of patches
This commit is contained in:
parent
7f785008c8
commit
cd754be396
|
@ -223,9 +223,9 @@ Patch.prototype.projectObjects = function (compiledProjection) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Patch.prototype.pretty = function () {
|
Patch.prototype.pretty = function () {
|
||||||
return ("<<<<<<<< Removed:\n" + Trie.prettyTrie(this.removed) + "\n" +
|
return ("\n" +
|
||||||
"======== Added:\n" + Trie.prettyTrie(this.added) + "\n" +
|
"-" + Trie.prettyTrie(this.removed, { lineSep: "\n-" }) + "\n" +
|
||||||
">>>>>>>>");
|
"+" + Trie.prettyTrie(this.added, { lineSep: "\n+" }) + "\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Completely ignores success-values in t.
|
// Completely ignores success-values in t.
|
||||||
|
|
|
@ -837,7 +837,7 @@ function prettyTrie(m, optionsOpt) {
|
||||||
.sortBy(function (k, key) { return key })
|
.sortBy(function (k, key) { return key })
|
||||||
.forEach(function (k, key) {
|
.forEach(function (k, key) {
|
||||||
if (needSep) {
|
if (needSep) {
|
||||||
acc.push("\n");
|
acc.push(options.lineSep || "\n");
|
||||||
acc.push(indentStr(i));
|
acc.push(indentStr(i));
|
||||||
} else {
|
} else {
|
||||||
needSep = true;
|
needSep = true;
|
||||||
|
|
Loading…
Reference in New Issue