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

Assign classes to deletions.

This commit is contained in:
Rob Rix 2015-10-23 21:25:55 -04:00
parent dc4fd6f659
commit ee1d00a74c

View File

@ -220,7 +220,12 @@
loadJSON('diff.json', function (json) {
var diff = diffFromJSON(json.diff);
var before = diff.map(function(value) {
return value.before != null ? termToDOM(value.before, "before", json["before"]) : "";
var element;
if (value.before != null) {
element = termToDOM(value.before, "before", json["before"]);
element.classList.add("delete");
}
return element || "";
});
var after = diff.map(function(value) {
return value.after != null ? termToDOM(value.after, "after", json["after"]) : "";