Skip to content
Snippets Groups Projects
Commit 6b53fa29 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[merge addon] Support passing in document objects as content

parent 58ce53c1
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
this.edit = this.mv.edit;
this.orig = CodeMirror(pane, copyObj({value: orig, readOnly: true}, copyObj(options)));
this.diff = getDiff(orig, options.value);
this.diff = getDiff(asString(orig), asString(options.value));
this.diffOutOfDate = false;
this.showDifferences = options.showDifferences !== false;
......@@ -352,6 +352,11 @@
}
};
function asString(obj) {
if (typeof obj == "string") return obj;
else return obj.getValue();
}
// Operations on diffs
var dmp = new diff_match_patch();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment