mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add scenarios for aligned tables with irregular trailing pipes.
This commit is contained in:
parent
e645385e2c
commit
dc9797828e
4 changed files with 423 additions and 1 deletions
|
|
@ -1101,7 +1101,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(222);
|
||||
t.plan(223);
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchemaStrict = ajv.compile(configSchemaStrict);
|
||||
|
|
|
|||
|
|
@ -68518,6 +68518,324 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## table-column-style-irregular-trailing-pipe.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
35,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 8,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
40,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 15,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
35,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
40,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 23,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
35,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 24,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
30,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 31,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
30,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 37,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
30,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 38,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
30,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 39,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
37,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 44,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
38,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 53,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with header for style "aligned"',
|
||||
errorRange: [
|
||||
38,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 54,
|
||||
ruleDescription: 'Table column style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md060.md',
|
||||
ruleNames: [
|
||||
'MD060',
|
||||
'table-column-style',
|
||||
],
|
||||
severity: 'error',
|
||||
},
|
||||
],
|
||||
fixed: `# Table Column Style - Irregular Trailing Pipe␊
|
||||
␊
|
||||
## Aligned / Edge Pipes␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ------- |␊
|
||||
| Text | Text text | Text |␊
|
||||
| Text | Text | Text text |␊
|
||||
| Text | Text text | Text |␊
|
||||
␊
|
||||
{MD060:-3}␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ------- |␊
|
||||
| Text | Text text | Text text text |␊
|
||||
| Text | Text | Text |␊
|
||||
| Text | Text text | Text text |␊
|
||||
␊
|
||||
{MD060:-2} {MD060:-4}␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ------- |␊
|
||||
| Text | Text text | Text text text |␊
|
||||
| Text | Text text | Text text |␊
|
||||
␊
|
||||
{MD060:-2} {MD060:-3}␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ------- |␊
|
||||
| Text | Text text | Text |␊
|
||||
| Text | Text | Text |␊
|
||||
| Text | Text text | Text |␊
|
||||
␊
|
||||
{MD060:-3}␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ---- |␊
|
||||
| Text | Text text | Text |␊
|
||||
| Text | Text text | Text |␊
|
||||
␊
|
||||
{MD060:-2} {MD060:-3} {MD060:-4}␊
|
||||
␊
|
||||
| Heading | Heading | Heading |␊
|
||||
| ------- | --------- | ----------- |␊
|
||||
| Text | Text text | Text text |␊
|
||||
| Text | Text text | Text text |␊
|
||||
␊
|
||||
{MD060:-4}␊
|
||||
␊
|
||||
| Heading | Heading |␊
|
||||
| ------- | ------- |␊
|
||||
| Text | Text |␊
|
||||
| Text | Text text text text |␊
|
||||
| Text | Text text text text text |␊
|
||||
␊
|
||||
{MD060:-2} {MD060:-3}␊
|
||||
␊
|
||||
## Aligned / No Edge Pipes␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | -------␊
|
||||
Text | Text text | Text␊
|
||||
Text | Text | Text text␊
|
||||
Text | Text text | Text␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | -------␊
|
||||
Text | Text text | Text text text␊
|
||||
Text | Text | Text␊
|
||||
Text | Text text | Text text␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | -------␊
|
||||
Text | Text text | Text text text␊
|
||||
Text | Text text | Text text␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | -------␊
|
||||
Text | Text text | Text␊
|
||||
Text | Text | Text␊
|
||||
Text | Text text | Text␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | ----␊
|
||||
Text | Text text | Text␊
|
||||
Text | Text text | Text␊
|
||||
␊
|
||||
Heading | Heading | Heading␊
|
||||
------- | --------- | ---------␊
|
||||
Text | Text text | Text␊
|
||||
Text | Text text | Text␊
|
||||
␊
|
||||
Heading | Heading␊
|
||||
------- | -------␊
|
||||
Text | Text␊
|
||||
Text | Text text text text␊
|
||||
Text | Text text text text text␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"table-column-style": {␊
|
||||
"style": "aligned"␊
|
||||
},␊
|
||||
"table-pipe-style": false␊
|
||||
} -->␊
|
||||
`,
|
||||
}
|
||||
|
||||
## table-column-style-tight.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Binary file not shown.
104
test/table-column-style-irregular-trailing-pipe.md
Normal file
104
test/table-column-style-irregular-trailing-pipe.md
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# Table Column Style - Irregular Trailing Pipe
|
||||
|
||||
## Aligned / Edge Pipes
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ------- |
|
||||
| Text | Text text | Text |
|
||||
| Text | Text | Text text |
|
||||
| Text | Text text | Text |
|
||||
|
||||
{MD060:-3}
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ------- |
|
||||
| Text | Text text | Text text text |
|
||||
| Text | Text | Text |
|
||||
| Text | Text text | Text text |
|
||||
|
||||
{MD060:-2} {MD060:-4}
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ------- |
|
||||
| Text | Text text | Text text text |
|
||||
| Text | Text text | Text text |
|
||||
|
||||
{MD060:-2} {MD060:-3}
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ------- |
|
||||
| Text | Text text | Text |
|
||||
| Text | Text | Text |
|
||||
| Text | Text text | Text |
|
||||
|
||||
{MD060:-3}
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ---- |
|
||||
| Text | Text text | Text |
|
||||
| Text | Text text | Text |
|
||||
|
||||
{MD060:-2} {MD060:-3} {MD060:-4}
|
||||
|
||||
| Heading | Heading | Heading |
|
||||
| ------- | --------- | ----------- |
|
||||
| Text | Text text | Text text |
|
||||
| Text | Text text | Text text |
|
||||
|
||||
{MD060:-4}
|
||||
|
||||
| Heading | Heading |
|
||||
| ------- | ------- |
|
||||
| Text | Text |
|
||||
| Text | Text text text text |
|
||||
| Text | Text text text text text |
|
||||
|
||||
{MD060:-2} {MD060:-3}
|
||||
|
||||
## Aligned / No Edge Pipes
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | -------
|
||||
Text | Text text | Text
|
||||
Text | Text | Text text
|
||||
Text | Text text | Text
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | -------
|
||||
Text | Text text | Text text text
|
||||
Text | Text | Text
|
||||
Text | Text text | Text text
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | -------
|
||||
Text | Text text | Text text text
|
||||
Text | Text text | Text text
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | -------
|
||||
Text | Text text | Text
|
||||
Text | Text | Text
|
||||
Text | Text text | Text
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | ----
|
||||
Text | Text text | Text
|
||||
Text | Text text | Text
|
||||
|
||||
Heading | Heading | Heading
|
||||
------- | --------- | ---------
|
||||
Text | Text text | Text
|
||||
Text | Text text | Text
|
||||
|
||||
Heading | Heading
|
||||
------- | -------
|
||||
Text | Text
|
||||
Text | Text text text text
|
||||
Text | Text text text text text
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"table-column-style": {
|
||||
"style": "aligned"
|
||||
},
|
||||
"table-pipe-style": false
|
||||
} -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue