diff --git a/lib/rules_block/table.js b/lib/rules_block/table.js index 44895fe12..4b1774270 100644 --- a/lib/rules_block/table.js +++ b/lib/rules_block/table.js @@ -6,7 +6,7 @@ var isSpace = require('../common/utils').isSpace; function getLine(state, line) { - var pos = state.bMarks[line] + state.blkIndent, + var pos = state.bMarks[line] + state.tShift[line], max = state.eMarks[line]; return state.src.substr(pos, max - pos); diff --git a/test/fixtures/markdown-it/tables.txt b/test/fixtures/markdown-it/tables.txt index 2ddf36772..c8e0d7805 100644 --- a/test/fixtures/markdown-it/tables.txt +++ b/test/fixtures/markdown-it/tables.txt @@ -568,6 +568,42 @@ Escape before escaped Pipes inside backticks don't split cells: . +Regression test for #721, table in a list indented with tabs: +. +- Level 1 + + - Level 2 + + | Column 1 | Column 2 | + | -------- | -------- | + | abcdefgh | ijklmnop | +. + +. + GFM 4.10 Tables (extension), Example 198 . | foo | bar |