1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Map diffs to divs.

This commit is contained in:
Rob Rix 2015-10-21 16:29:42 -04:00
parent 6ef105ab08
commit d5d86e222c

View File

@ -88,6 +88,19 @@
return element;
}
if (model instanceof Diff) {
var element = document.createElement("div");
element.classList.add("diff");
if (model.pure != null) {
element.classList.add("pure");
element.appendChild(toDOM(model.pure));
} else if(model.roll != null) {
element.classList.add("roll");
element.appendChild(toDOM(model.roll));
}
return element;
}
}
function patch(patch, a, b) {