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

Construct keyed nodes as a definition list.

This commit is contained in:
Rob Rix 2015-10-21 16:34:20 -04:00
parent 25e9054d06
commit 5347b50ad3

View File

@ -99,6 +99,17 @@
return element;
}
if (model.syntax instanceof Keyed) {
var element = document.createElement("dl");
for (k in model.syntax) {
var dt = document.createElement("dt");
dt.textContent = k;
element.appendChild(dt);
element.appendChild(wrap("dd", toDOM(model.syntax[k])));
}
return element;
}
if (model.syntax instanceof Leaf) {
var element = document.createElement("span");
// ?