tokens.forEach((token) => { if (token.type === 'heading' && token.text) { currentHeader = token.text; addons[currentHeader] = { files: {} }; } if (token.type === 'code') { var match = token.text.match(/^\/\/\s+(.*\.(?:cc|h|js))[\r\n]/); if (match !== null) { addons[currentHeader].files[match[1]] = token.text; } } });
const lexed = marked.lexer(input); lexed.forEach(function(tok) { const type = tok.type; var text = tok.text; 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'; state = 'AFTERHEADING_BLOCKQUOTE'; return; } else if (type === 'list_start' && !tok.ordered) { state = 'AFTERHEADING_LIST'; current.list = current.list || []; current.list.push(tok); current.list.level = 1; } else if (type === 'html' && common.isYAMLBlock(tok.text)) {
var lexed = marked.lexer(input); lexed.forEach(function (tok) { var type = tok.type; var text = tok.text; 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'; current.stabilityText = stability[2].trim(); return; } else if (type === 'list_start' && !tok.ordered) { state = 'AFTERHEADING_LIST'; current.list = current.list || [];