mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-23 21:34:06 +01:00
Update MD060/table-column-style to account for emoji and CJK characters rendering at 2x Latin width (fixes #1869).
This commit is contained in:
parent
ec380a87c0
commit
9b116ae889
13 changed files with 254 additions and 61 deletions
|
|
@ -1101,7 +1101,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(219);
|
||||
t.plan(220);
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchemaStrict = ajv.compile(configSchemaStrict);
|
||||
|
|
|
|||
|
|
@ -556,8 +556,6 @@ Generated by [AVA](https://avajs.dev).
|
|||
test-repos/v8-v8-dev/src/features/promise-combinators.md:23 error MD058/blanks-around-tables Tables should be surrounded by blank lines [Context: "| name ..."]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-combinators.md:28 error MD058/blanks-around-tables Tables should be surrounded by blank lines [Context: "| [\`Promise.any\`](#promise.any..."]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-combinators.md:25:172 error MD060/table-column-style Table column style [Table pipe does not align with heading for style "aligned"]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-combinators.md:26:162 error MD060/table-column-style Table column style [Table pipe does not align with heading for style "aligned"]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-combinators.md:27:162 error MD060/table-column-style Table column style [Table pipe does not align with heading for style "aligned"]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-combinators.md:28:172 error MD060/table-column-style Table column style [Table pipe does not align with heading for style "aligned"]␊
|
||||
test-repos/v8-v8-dev/src/features/promise-finally.md:82:1 error MD033/no-inline-html Inline HTML [Element: feature-support]␊
|
||||
test-repos/v8-v8-dev/src/features/regexp-match-indices.md:134:1 error MD033/no-inline-html Inline HTML [Element: feature-support]␊
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -67803,7 +67803,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: null,
|
||||
errorDetail: 'Table pipe does not align with heading for style "aligned"',
|
||||
errorRange: [
|
||||
19,
|
||||
20,
|
||||
1,
|
||||
],
|
||||
fixInfo: null,
|
||||
|
|
@ -67857,9 +67857,9 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
| Response | Emoji |␊
|
||||
| -------- | ----- |␊
|
||||
| Yes | ✅ |␊
|
||||
| No | ❎ |␊
|
||||
| Oops | ❌ |␊
|
||||
| Yes | ✅ |␊
|
||||
| No | ❎ |␊
|
||||
| Oops | ❌ |␊
|
||||
␊
|
||||
{MD060:-2}␊
|
||||
␊
|
||||
|
|
@ -72533,6 +72533,72 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## table-column-style-wide-characters.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [],
|
||||
fixed: `# Table Column Style - Wide Characters␊
|
||||
␊
|
||||
## Emoji␊
|
||||
␊
|
||||
| AB | CD |␊
|
||||
| -- | -- |␊
|
||||
| EF | GH |␊
|
||||
| ✅ | KL |␊
|
||||
| MN | ✅ |␊
|
||||
| ✅ | ✅ |␊
|
||||
␊
|
||||
| ✅ | CD |␊
|
||||
| -- | -- |␊
|
||||
| EF | GH |␊
|
||||
| ✅ | KL |␊
|
||||
| MN | ✅ |␊
|
||||
| ✅ | ✅ |␊
|
||||
␊
|
||||
| AB | ✅ |␊
|
||||
| -- | -- |␊
|
||||
| EF | GH |␊
|
||||
| ✅ | KL |␊
|
||||
| MN | ✅ |␊
|
||||
| ✅ | ✅ |␊
|
||||
␊
|
||||
| ✅ | ✅ |␊
|
||||
| -- | -- |␊
|
||||
| EF | GH |␊
|
||||
| ✅ | KL |␊
|
||||
| MN | ✅ |␊
|
||||
| ✅ | ✅ |␊
|
||||
␊
|
||||
## Hello World␊
|
||||
␊
|
||||
| Language | Translation |␊
|
||||
|---------------------|----------------|␊
|
||||
| Emoji | 👋🌎 |␊
|
||||
| Portuguese (Brazil) | Olá mundo |␊
|
||||
| Turkish | Merhaba dünya |␊
|
||||
| Chinese (Mandarin) | 你好,世界 |␊
|
||||
| Japanese | こんにちは世界 |␊
|
||||
| Korean | 안녕 세상 |␊
|
||||
␊
|
||||
## ANSI Escape Codes␊
|
||||
␊
|
||||
| Style | Escape codes |␊
|
||||
| --------- | ------------------------------------------------------- |␊
|
||||
| Bold | \\u001B[1m大胆な\\u001B[22m |␊
|
||||
| Underline | \\u001B[4mUnderline\\u001B[0m |␊
|
||||
| Link | \\u001B]8;;https://example.com\\u0007Link\\u001B]8;;\\u0007 |␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"no-bare-urls": false,␊
|
||||
"table-column-style": {␊
|
||||
"style": "aligned"␊
|
||||
}␊
|
||||
} -->␊
|
||||
`,
|
||||
}
|
||||
|
||||
## table-content-with-issues.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
| Response | Emoji |
|
||||
| -------- | ----- |
|
||||
| Yes | ✅ |
|
||||
| No | ❎ |
|
||||
| Oops | ❌ |
|
||||
| Yes | ✅ |
|
||||
| No | ❎ |
|
||||
| Oops | ❌ |
|
||||
|
||||
{MD060:-2}
|
||||
|
||||
|
|
|
|||
57
test/table-column-style-wide-characters.md
Normal file
57
test/table-column-style-wide-characters.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# Table Column Style - Wide Characters
|
||||
|
||||
## Emoji
|
||||
|
||||
| AB | CD |
|
||||
| -- | -- |
|
||||
| EF | GH |
|
||||
| ✅ | KL |
|
||||
| MN | ✅ |
|
||||
| ✅ | ✅ |
|
||||
|
||||
| ✅ | CD |
|
||||
| -- | -- |
|
||||
| EF | GH |
|
||||
| ✅ | KL |
|
||||
| MN | ✅ |
|
||||
| ✅ | ✅ |
|
||||
|
||||
| AB | ✅ |
|
||||
| -- | -- |
|
||||
| EF | GH |
|
||||
| ✅ | KL |
|
||||
| MN | ✅ |
|
||||
| ✅ | ✅ |
|
||||
|
||||
| ✅ | ✅ |
|
||||
| -- | -- |
|
||||
| EF | GH |
|
||||
| ✅ | KL |
|
||||
| MN | ✅ |
|
||||
| ✅ | ✅ |
|
||||
|
||||
## Hello World
|
||||
|
||||
| Language | Translation |
|
||||
|---------------------|----------------|
|
||||
| Emoji | 👋🌎 |
|
||||
| Portuguese (Brazil) | Olá mundo |
|
||||
| Turkish | Merhaba dünya |
|
||||
| Chinese (Mandarin) | 你好,世界 |
|
||||
| Japanese | こんにちは世界 |
|
||||
| Korean | 안녕 세상 |
|
||||
|
||||
## ANSI Escape Codes
|
||||
|
||||
| Style | Escape codes |
|
||||
| --------- | ------------------------------------------------------- |
|
||||
| Bold | \u001B[1m大胆な\u001B[22m |
|
||||
| Underline | \u001B[4mUnderline\u001B[0m |
|
||||
| Link | \u001B]8;;https://example.com\u0007Link\u001B]8;;\u0007 |
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"no-bare-urls": false,
|
||||
"table-column-style": {
|
||||
"style": "aligned"
|
||||
}
|
||||
} -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue