mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Map the before and after terms separately I guess.
This commit is contained in:
parent
fc60c75b14
commit
5939f3a865
@ -219,14 +219,14 @@
|
||||
<script type="text/javascript">
|
||||
loadJSON('diff.json', function (json) {
|
||||
var diff = diffFromJSON(json.diff);
|
||||
var mapped = diff.map(function(value) {
|
||||
return {
|
||||
before: value.before != null ? termToDOM(value.before, "before", json["before"]) : document.createTextNode(""),
|
||||
after: value.after != null ? termToDOM(value.after, "after", json["after"]) : document.createTextNode(""),
|
||||
};
|
||||
var before = diff.map(function(value) {
|
||||
return value.before != null ? termToDOM(value.before, "before", json["before"]) : null;
|
||||
});
|
||||
document.getElementById("before").appendChild(toDOM(mapped, "before", json["before"]));
|
||||
document.getElementById("after").appendChild(toDOM(mapped, "after", json["after"]));
|
||||
var after = diff.map(function(value) {
|
||||
return value.after != null ? termToDOM(value.after, "after", json["after"]) : null;
|
||||
});
|
||||
document.getElementById("before").appendChild(diffToDOM(before, "before", json["before"]));
|
||||
document.getElementById("after").appendChild(diffToDOM(after, "after", json["after"]));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user