Skip to content

Commit

Permalink
Add missing line mapping for table rows
Browse files Browse the repository at this point in the history
fix #705
  • Loading branch information
rlidwka committed Sep 11, 2020
1 parent 805c695 commit 0b1699b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rules_block/table.js
Expand Up @@ -175,11 +175,13 @@ module.exports = function table(state, startLine, endLine, silent) {
token = state.push('tr_open', 'tr', 1);
for (i = 0; i < columnCount; i++) {
token = state.push('td_open', 'td', 1);
token.map = [ nextLine, nextLine + 1 ];
if (aligns[i]) {
token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
}

token = state.push('inline', '', 0);
token.map = [ nextLine, nextLine + 1 ];
token.content = columns[i] ? columns[i].trim() : '';
token.children = [];

Expand Down

0 comments on commit 0b1699b

Please sign in to comment.