1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00

Handle keyed elements specially when there’s source ranges.

This commit is contained in:
Rob Rix 2015-10-21 17:38:11 -04:00
parent 51a304ae0f
commit 6539b309a8

View File

@ -136,11 +136,15 @@
if (model instanceof Keyed) {
element = document.createElement("dl");
for (k in model.values) {
var dt = document.createElement("dt");
dt.textContent = k;
element.appendChild(dt);
element.appendChild(wrap("dd", toDOM(model.values[k])));
if (model.source != null && model.range != null) {
} else {
for (k in model.values) {
var dt = document.createElement("dt");
dt.textContent = k;
element.appendChild(dt);
element.appendChild(wrap("dd", toDOM(model.values[k])));
}
}
}