diff --git a/test/every-markdown-syntax.md b/test/every-markdown-syntax.md index f590e62a..02623d04 100644 --- a/test/every-markdown-syntax.md +++ b/test/every-markdown-syntax.md @@ -44,4 +44,8 @@ Fenced code block HTML block

+| Table | Heading | +| ----- | ------- | +| Table | Cell | + diff --git a/test/snapshots/markdownlint-test-micromark.mjs.md b/test/snapshots/markdownlint-test-micromark.mjs.md index cf5e9dd8..361f5da0 100644 --- a/test/snapshots/markdownlint-test-micromark.mjs.md +++ b/test/snapshots/markdownlint-test-micromark.mjs.md @@ -2654,28 +2654,473 @@ Generated by [AVA](https://avajs.dev). { children: [ { - children: [], - endColumn: 35, + children: [ + { + children: [ + { + children: [ + { + children: [], + endColumn: 2, + endLine: 47, + startColumn: 1, + startLine: 47, + text: '|', + type: 'tableCellDivider', + }, + { + children: [], + endColumn: 3, + endLine: 47, + startColumn: 2, + startLine: 47, + text: ' ', + type: 'whitespace', + }, + { + children: [ + { + children: [], + endColumn: 8, + endLine: 47, + startColumn: 3, + startLine: 47, + text: 'Table', + type: 'data', + }, + ], + endColumn: 8, + endLine: 47, + startColumn: 3, + startLine: 47, + text: 'Table', + type: 'tableContent', + }, + { + children: [], + endColumn: 9, + endLine: 47, + startColumn: 8, + startLine: 47, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 10, + endLine: 47, + startColumn: 9, + startLine: 47, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 10, + endLine: 47, + startColumn: 1, + startLine: 47, + text: '| Table |', + type: 'tableHeader', + }, + { + children: [ + { + children: [], + endColumn: 11, + endLine: 47, + startColumn: 10, + startLine: 47, + text: ' ', + type: 'whitespace', + }, + { + children: [ + { + children: [], + endColumn: 18, + endLine: 47, + startColumn: 11, + startLine: 47, + text: 'Heading', + type: 'data', + }, + ], + endColumn: 18, + endLine: 47, + startColumn: 11, + startLine: 47, + text: 'Heading', + type: 'tableContent', + }, + { + children: [], + endColumn: 19, + endLine: 47, + startColumn: 18, + startLine: 47, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 20, + endLine: 47, + startColumn: 19, + startLine: 47, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 20, + endLine: 47, + startColumn: 10, + startLine: 47, + text: ' Heading |', + type: 'tableHeader', + }, + ], + endColumn: 20, + endLine: 47, + startColumn: 1, + startLine: 47, + text: '| Table | Heading |', + type: 'tableRow', + }, + ], + endColumn: 20, endLine: 47, startColumn: 1, startLine: 47, + text: '| Table | Heading |', + type: 'tableHead', + }, + { + children: [], + endColumn: 1, + endLine: 48, + startColumn: 20, + startLine: 47, + text: `␊ + `, + type: 'lineEnding', + }, + { + children: [ + { + children: [ + { + children: [], + endColumn: 2, + endLine: 48, + startColumn: 1, + startLine: 48, + text: '|', + type: 'tableCellDivider', + }, + { + children: [], + endColumn: 3, + endLine: 48, + startColumn: 2, + startLine: 48, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 8, + endLine: 48, + startColumn: 3, + startLine: 48, + text: '-----', + type: 'tableDelimiterFiller', + }, + { + children: [], + endColumn: 9, + endLine: 48, + startColumn: 8, + startLine: 48, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 10, + endLine: 48, + startColumn: 9, + startLine: 48, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 10, + endLine: 48, + startColumn: 1, + startLine: 48, + text: '| ----- |', + type: 'tableDelimiter', + }, + { + children: [ + { + children: [], + endColumn: 11, + endLine: 48, + startColumn: 10, + startLine: 48, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 18, + endLine: 48, + startColumn: 11, + startLine: 48, + text: '-------', + type: 'tableDelimiterFiller', + }, + { + children: [], + endColumn: 19, + endLine: 48, + startColumn: 18, + startLine: 48, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 20, + endLine: 48, + startColumn: 19, + startLine: 48, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 20, + endLine: 48, + startColumn: 10, + startLine: 48, + text: ' ------- |', + type: 'tableDelimiter', + }, + ], + endColumn: 20, + endLine: 48, + startColumn: 1, + startLine: 48, + text: '| ----- | ------- |', + type: 'tableDelimiterRow', + }, + { + children: [], + endColumn: 1, + endLine: 49, + startColumn: 20, + startLine: 48, + text: `␊ + `, + type: 'lineEnding', + }, + { + children: [ + { + children: [ + { + children: [ + { + children: [], + endColumn: 2, + endLine: 49, + startColumn: 1, + startLine: 49, + text: '|', + type: 'tableCellDivider', + }, + { + children: [], + endColumn: 3, + endLine: 49, + startColumn: 2, + startLine: 49, + text: ' ', + type: 'whitespace', + }, + { + children: [ + { + children: [], + endColumn: 8, + endLine: 49, + startColumn: 3, + startLine: 49, + text: 'Table', + type: 'data', + }, + ], + endColumn: 8, + endLine: 49, + startColumn: 3, + startLine: 49, + text: 'Table', + type: 'tableContent', + }, + { + children: [], + endColumn: 9, + endLine: 49, + startColumn: 8, + startLine: 49, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 10, + endLine: 49, + startColumn: 9, + startLine: 49, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 10, + endLine: 49, + startColumn: 1, + startLine: 49, + text: '| Table |', + type: 'tableData', + }, + { + children: [ + { + children: [], + endColumn: 11, + endLine: 49, + startColumn: 10, + startLine: 49, + text: ' ', + type: 'whitespace', + }, + { + children: [ + { + children: [], + endColumn: 15, + endLine: 49, + startColumn: 11, + startLine: 49, + text: 'Cell', + type: 'data', + }, + ], + endColumn: 15, + endLine: 49, + startColumn: 11, + startLine: 49, + text: 'Cell', + type: 'tableContent', + }, + { + children: [], + endColumn: 19, + endLine: 49, + startColumn: 15, + startLine: 49, + text: ' ', + type: 'whitespace', + }, + { + children: [], + endColumn: 20, + endLine: 49, + startColumn: 19, + startLine: 49, + text: '|', + type: 'tableCellDivider', + }, + ], + endColumn: 20, + endLine: 49, + startColumn: 10, + startLine: 49, + text: ' Cell |', + type: 'tableData', + }, + ], + endColumn: 20, + endLine: 49, + startColumn: 1, + startLine: 49, + text: '| Table | Cell |', + type: 'tableRow', + }, + ], + endColumn: 20, + endLine: 49, + startColumn: 1, + startLine: 49, + text: '| Table | Cell |', + type: 'tableBody', + }, + ], + endColumn: 20, + endLine: 49, + startColumn: 1, + startLine: 47, + text: `| Table | Heading |␊ + | ----- | ------- |␊ + | Table | Cell |`, + type: 'table', + }, + { + children: [], + endColumn: 1, + endLine: 50, + startColumn: 20, + startLine: 49, + text: `␊ + `, + type: 'lineEnding', + }, + { + children: [], + endColumn: 1, + endLine: 51, + startColumn: 1, + startLine: 50, + text: `␊ + `, + type: 'lineEndingBlank', + }, + { + children: [ + { + children: [], + endColumn: 35, + endLine: 51, + startColumn: 1, + startLine: 51, text: '', type: 'htmlFlowData', }, ], endColumn: 35, - endLine: 47, + endLine: 51, startColumn: 1, - startLine: 47, + startLine: 51, text: '', type: 'htmlFlow', }, { children: [], endColumn: 1, - endLine: 48, + endLine: 52, startColumn: 35, - startLine: 47, + startLine: 51, text: `␊ `, type: 'lineEnding', diff --git a/test/snapshots/markdownlint-test-micromark.mjs.snap b/test/snapshots/markdownlint-test-micromark.mjs.snap index 14853861..8252cad3 100644 Binary files a/test/snapshots/markdownlint-test-micromark.mjs.snap and b/test/snapshots/markdownlint-test-micromark.mjs.snap differ diff --git a/test/snapshots/markdownlint-test-scenarios.js.md b/test/snapshots/markdownlint-test-scenarios.js.md index ed28b157..0b236791 100644 --- a/test/snapshots/markdownlint-test-scenarios.js.md +++ b/test/snapshots/markdownlint-test-scenarios.js.md @@ -10526,6 +10526,10 @@ Generated by [AVA](https://avajs.dev). HTML block␊

␊ ␊ + | Table | Heading |␊ + | ----- | ------- |␊ + | Table | Cell |␊ + ␊ ␊ `, } diff --git a/test/snapshots/markdownlint-test-scenarios.js.snap b/test/snapshots/markdownlint-test-scenarios.js.snap index 8b53818f..67c1a52f 100644 Binary files a/test/snapshots/markdownlint-test-scenarios.js.snap and b/test/snapshots/markdownlint-test-scenarios.js.snap differ