mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-22 04:44:06 +01:00
Update MD049/emphasis-style and MD050/strong-style to correctly report and fix multiple identical violations on the same line (fixes #486).
This commit is contained in:
parent
54369a00e6
commit
c4f51090ae
8 changed files with 258 additions and 42 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD043": {
|
||||
"headings": [
|
||||
"# Heading"
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ strong **emphasis
|
|||
spanning** many
|
||||
lines
|
||||
|
||||
Inconsistent _double_ text _interleaved_ text _double_ _interleaved_ emphasis.
|
||||
|
||||
Inconsistent **double** text **interleaved** text **double** **interleaved** strong emphasis.
|
||||
|
||||
Missing newline character
|
||||
|
|
@ -42,4 +42,8 @@ strong **emphasis
|
|||
spanning** many
|
||||
lines
|
||||
|
||||
Inconsistent *double* text *interleaved* text *double* *interleaved* emphasis.
|
||||
|
||||
Inconsistent __double__ text __interleaved__ text __double__ __interleaved__ strong emphasis.
|
||||
|
||||
Missing newline character
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
"fixInfo": null
|
||||
},
|
||||
{
|
||||
"lineNumber": 45,
|
||||
"lineNumber": 49,
|
||||
"ruleNames": [
|
||||
"MD043",
|
||||
"required-headings",
|
||||
|
|
@ -178,7 +178,7 @@
|
|||
"fixInfo": null
|
||||
},
|
||||
{
|
||||
"lineNumber": 45,
|
||||
"lineNumber": 49,
|
||||
"ruleNames": [
|
||||
"MD047",
|
||||
"single-trailing-newline"
|
||||
|
|
@ -262,6 +262,86 @@
|
|||
"emphasis-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: asterisk; Actual: underscore",
|
||||
"errorRange": [
|
||||
14,
|
||||
8
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 8,
|
||||
"editColumn": 14,
|
||||
"insertText": "*double*"
|
||||
},
|
||||
"lineNumber": 45,
|
||||
"ruleDescription": "Emphasis style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049",
|
||||
"ruleNames": [
|
||||
"MD049",
|
||||
"emphasis-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: asterisk; Actual: underscore",
|
||||
"errorRange": [
|
||||
28,
|
||||
13
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 13,
|
||||
"editColumn": 28,
|
||||
"insertText": "*interleaved*"
|
||||
},
|
||||
"lineNumber": 45,
|
||||
"ruleDescription": "Emphasis style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049",
|
||||
"ruleNames": [
|
||||
"MD049",
|
||||
"emphasis-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: asterisk; Actual: underscore",
|
||||
"errorRange": [
|
||||
47,
|
||||
8
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 8,
|
||||
"editColumn": 47,
|
||||
"insertText": "*double*"
|
||||
},
|
||||
"lineNumber": 45,
|
||||
"ruleDescription": "Emphasis style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049",
|
||||
"ruleNames": [
|
||||
"MD049",
|
||||
"emphasis-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: asterisk; Actual: underscore",
|
||||
"errorRange": [
|
||||
56,
|
||||
13
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 13,
|
||||
"editColumn": 56,
|
||||
"insertText": "*interleaved*"
|
||||
},
|
||||
"lineNumber": 45,
|
||||
"ruleDescription": "Emphasis style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049",
|
||||
"ruleNames": [
|
||||
"MD049",
|
||||
"emphasis-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: underscore; Actual: asterisk",
|
||||
|
|
@ -314,5 +394,85 @@
|
|||
"MD050",
|
||||
"strong-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: underscore; Actual: asterisk",
|
||||
"errorRange": [
|
||||
14,
|
||||
10
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 10,
|
||||
"editColumn": 14,
|
||||
"insertText": "__double__"
|
||||
},
|
||||
"lineNumber": 47,
|
||||
"ruleDescription": "Strong style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050",
|
||||
"ruleNames": [
|
||||
"MD050",
|
||||
"strong-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: underscore; Actual: asterisk",
|
||||
"errorRange": [
|
||||
30,
|
||||
15
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 15,
|
||||
"editColumn": 30,
|
||||
"insertText": "__interleaved__"
|
||||
},
|
||||
"lineNumber": 47,
|
||||
"ruleDescription": "Strong style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050",
|
||||
"ruleNames": [
|
||||
"MD050",
|
||||
"strong-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: underscore; Actual: asterisk",
|
||||
"errorRange": [
|
||||
51,
|
||||
10
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 10,
|
||||
"editColumn": 51,
|
||||
"insertText": "__double__"
|
||||
},
|
||||
"lineNumber": 47,
|
||||
"ruleDescription": "Strong style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050",
|
||||
"ruleNames": [
|
||||
"MD050",
|
||||
"strong-style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"errorContext": null,
|
||||
"errorDetail": "Expected: underscore; Actual: asterisk",
|
||||
"errorRange": [
|
||||
62,
|
||||
15
|
||||
],
|
||||
"fixInfo": {
|
||||
"deleteCount": 15,
|
||||
"editColumn": 62,
|
||||
"insertText": "__interleaved__"
|
||||
},
|
||||
"lineNumber": 47,
|
||||
"ruleDescription": "Strong style should be consistent",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050",
|
||||
"ruleNames": [
|
||||
"MD050",
|
||||
"strong-style"
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue