mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +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">
|
<script type="text/javascript">
|
||||||
loadJSON('diff.json', function (json) {
|
loadJSON('diff.json', function (json) {
|
||||||
var diff = diffFromJSON(json.diff);
|
var diff = diffFromJSON(json.diff);
|
||||||
var mapped = diff.map(function(value) {
|
var before = diff.map(function(value) {
|
||||||
return {
|
return value.before != null ? termToDOM(value.before, "before", json["before"]) : null;
|
||||||
before: value.before != null ? termToDOM(value.before, "before", json["before"]) : document.createTextNode(""),
|
|
||||||
after: value.after != null ? termToDOM(value.after, "after", json["after"]) : document.createTextNode(""),
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
document.getElementById("before").appendChild(toDOM(mapped, "before", json["before"]));
|
var after = diff.map(function(value) {
|
||||||
document.getElementById("after").appendChild(toDOM(mapped, "after", json["after"]));
|
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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user