Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Iterator-based code

View gist:5628390
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
function parseTable(title, lines) {
let options = new TableOptions(lines.next());
...
yield '<table>';
for (let line of lines) {
if (line.startsWith(macros.tableEnd))
break;
...
let buffer = line;
while(true) {
let open = buffer.match(openRE).length;
let close = buffer.match(closeRE).length;
if (close >= open) break;
buffer += lines.next();
}
...
}
...
yield '</table>';
}
 
function parse(lines) {
...
for (let line of lines) {
...
if (macro === macros.tableStart)
for (let l of parseTable(line, lines))
yield l;
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.