1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

append index beforehand

This commit is contained in:
joshvera 2015-11-03 10:45:32 -05:00
parent b19e995ae2
commit 78ba276948

View File

@ -395,7 +395,7 @@ function rollToDOM(sources, rollOrTerm, getRangeFun, diffToDOMFun) {
var nextIndex = befores.indexOf(a) + 1;
if (childElA.classList.contains("invisible") && nextIndex < afters.length) {
var nextVisibleElement = afters[nextIndex]
while (nextVisibleElement.child.classList.contains("invisible") && nextIndex++ < afters.length) {
while (nextVisibleElement.child.classList.contains("invisible") && ++nextIndex < afters.length) {
nextVisibleElement = afters[nextIndex]
}
if (nextVisibleElement == null) return;
@ -408,11 +408,12 @@ function rollToDOM(sources, rollOrTerm, getRangeFun, diffToDOMFun) {
elementA.appendChild(node);
}
var nextIndex = afters.indexOf(b) + 1;
if (childElB.classList.contains("invisible") && nextIndex < befores.length) {
console.log("Right Element: " + key + " is invisible")
console.log("Adding invisible separator text:");
var nextVisibleElement = befores[nextIndex]
while (nextVisibleElement.child.classList.contains("invisible") && nextIndex++ < befores.length) {
while (nextVisibleElement.child.classList.contains("invisible") && ++nextIndex < befores.length) {
nextVisibleElement = befores[nextIndex]
}
if (nextVisibleElement == null) return;