|
@ -64,7 +64,8 @@ module.exports = function table(state, startLine, endLine, silent) { |
|
|
state.tokens.push({ |
|
|
state.tokens.push({ |
|
|
type: 'inline', |
|
|
type: 'inline', |
|
|
content: rows[i].trim(), |
|
|
content: rows[i].trim(), |
|
|
level: state.level |
|
|
level: state.level, |
|
|
|
|
|
children: [] |
|
|
}); |
|
|
}); |
|
|
state.tokens.push({ type: 'th_close', level: --state.level }); |
|
|
state.tokens.push({ type: 'th_close', level: --state.level }); |
|
|
} |
|
|
} |
|
@ -85,7 +86,9 @@ module.exports = function table(state, startLine, endLine, silent) { |
|
|
state.tokens.push({ type: 'td_open', align: aligns[i], level: state.level++ }); |
|
|
state.tokens.push({ type: 'td_open', align: aligns[i], level: state.level++ }); |
|
|
state.tokens.push({ |
|
|
state.tokens.push({ |
|
|
type: 'inline', |
|
|
type: 'inline', |
|
|
content: rows[i].replace(/^\|? *| *\|?$/g, '') |
|
|
content: rows[i].replace(/^\|? *| *\|?$/g, ''), |
|
|
|
|
|
level: state.level, |
|
|
|
|
|
children: [] |
|
|
}); |
|
|
}); |
|
|
state.tokens.push({ type: 'td_close', level: --state.level }); |
|
|
state.tokens.push({ type: 'td_close', level: --state.level }); |
|
|
} |
|
|
} |
|
|