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

Assign classes to insertions.

This commit is contained in:
Rob Rix 2015-10-23 21:27:11 -04:00
parent ee1d00a74c
commit 6a76b1d97e

View File

@ -228,7 +228,12 @@
return element || ""; return element || "";
}); });
var after = diff.map(function(value) { var after = diff.map(function(value) {
return value.after != null ? termToDOM(value.after, "after", json["after"]) : ""; var element;
if (value.after != null) {
element = termToDOM(value.after, "after", json["after"]);
element.classList.add("insert")
}
return element || "";
}); });
document.getElementById("before").appendChild(diffToDOM(before, "before", json["before"])); document.getElementById("before").appendChild(diffToDOM(before, "before", json["before"]));
document.getElementById("after").appendChild(diffToDOM(after, "after", json["after"])); document.getElementById("after").appendChild(diffToDOM(after, "after", json["after"]));