mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Display Fixed nodes.
This commit is contained in:
parent
53cea24ddc
commit
ec06db7c08
@ -103,11 +103,12 @@
|
|||||||
if (syntax.leaf != null) {
|
if (syntax.leaf != null) {
|
||||||
element = document.createElement("span");
|
element = document.createElement("span");
|
||||||
element.textContent = source.substr(range[0], range[1]);
|
element.textContent = source.substr(range[0], range[1]);
|
||||||
} else if (syntax.indexed != null) {
|
} else if (syntax.indexed != null || syntax.fixed != null) {
|
||||||
|
var values = syntax.indexed || syntax.fixed;
|
||||||
element = document.createElement("ul");
|
element = document.createElement("ul");
|
||||||
var previous = range[0];
|
var previous = range[0];
|
||||||
for (i in syntax.indexed) {
|
for (i in values) {
|
||||||
var child = syntax.indexed[i];
|
var child = values[i];
|
||||||
if (child.pure == "") continue;
|
if (child.pure == "") continue;
|
||||||
var childRange = getRange(child);
|
var childRange = getRange(child);
|
||||||
element.appendChild(document.createTextNode(source.substr(previous, childRange[0] - previous)));
|
element.appendChild(document.createTextNode(source.substr(previous, childRange[0] - previous)));
|
||||||
|
Loading…
Reference in New Issue
Block a user