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

Attempt to correct Diff/DOM mapping.

This commit is contained in:
Rob Rix 2015-10-23 19:23:58 -04:00
parent 27853e30b1
commit 7bff777b07

View File

@ -110,14 +110,15 @@
}
if (model instanceof Diff) {
element = document.createElement("div");
element.classList.add("diff");
if (model.pure != null) {
element = document.createElement("div");
element.classList.add("diff");
element.classList.add("pure");
element.appendChild(toDOM(model.pure));
element.appendChild(toDOM(model.pure[stateName], stateName, source));
} else if(model.roll != null) {
element = rangeAndSyntaxToDOM(model.ranges[stateName], mapped, source, function(child) { return toDOM(child, stateName, source); });
element.classList.add("diff");
element.classList.add("roll");
element.appendChild(toDOM(model.roll));
}
}