1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Map deletion/insertion patches in the source diff into deletions/insertions.

This commit is contained in:
Rob Rix 2015-10-21 15:50:29 -04:00
parent 014efdc84e
commit ba55d8a5ad

View File

@ -86,9 +86,9 @@
function patch(patch) { function patch(patch) {
var before = document.getElementById("before"); var before = document.getElementById("before");
var after = document.getElementById("after"); var after = document.getElementById("after");
if (patch.delete != null) { return term(patch.delete, before); } if (patch.delete != null) { return Delete(term(patch.delete)); }
if (patch.insert != null) { return term(patch.insert, after); } if (patch.insert != null) { return Insert(term(patch.insert)); }
if (patch.replace != null) { if (patch.replace != null) {
if (term.patch.before != null) { term(patch.replace.before, before); } if (term.patch.before != null) { term(patch.replace.before, before); }
if (term.patch.after != null) { term(patch.replace.after, after); } if (term.patch.after != null) { term(patch.replace.after, after); }