|
|
@ -140,12 +140,15 @@ module.exports = function table(state, startLine, endLine, silent) { |
|
|
|
if (lineText.indexOf('|') === -1) { break; } |
|
|
|
rows = escapedSplit(lineText.replace(/^\||\|$/g, '')); |
|
|
|
|
|
|
|
// set number of columns to number of columns in header row
|
|
|
|
rows.length = aligns.length; |
|
|
|
|
|
|
|
state.tokens.push({ type: 'tr_open', level: state.level++ }); |
|
|
|
for (i = 0; i < rows.length; i++) { |
|
|
|
state.tokens.push({ type: 'td_open', align: aligns[i], level: state.level++ }); |
|
|
|
state.tokens.push({ |
|
|
|
type: 'inline', |
|
|
|
content: rows[i].trim(), |
|
|
|
content: rows[i] ? rows[i].trim() : '', |
|
|
|
level: state.level, |
|
|
|
children: [] |
|
|
|
}); |
|
|
|