if (tok.depth - depth > 1) { return cb(new Error('Inappropriate heading level\n'+ JSON.stringify(tok))); depth === tok.depth) { var clone = current; current = newSection(tok); var d = tok.depth; while (d <= depth) { finishSection(stack.pop(), stack[stack.length - 1]); depth = tok.depth; stack.push(current); state = 'AFTERHEADING';
if (tok.depth - depth > 1) { return cb(new Error('Inappropriate heading level\n' + JSON.stringify(tok))); depth === tok.depth) { var clone = current; current = newSection(tok); var d = tok.depth; while (d <= depth) { finishSection(stack.pop(), stack[stack.length - 1]); depth = tok.depth; stack.push(current); state = 'AFTERHEADING';