mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Improve highlighting for MD027/no-multiple-space-blockquote, add more tests.
This commit is contained in:
parent
1dce3e45d3
commit
681e8bae4e
5 changed files with 62 additions and 1 deletions
|
@ -13,7 +13,7 @@ var htmlRe = /<[^>]*>/;
|
|||
var listItemMarkerRe = /^[\s>]*(?:[*+-]|\d+\.)\s+/;
|
||||
var listItemMarkerInterruptsRe = /^[\s>]*(?:[*+-]|1\.)\s+/;
|
||||
var reversedLinkRe = /\([^)]+\)\[[^\]^][^\]]*]/;
|
||||
var spaceAfterBlockQuote = />\s+\S/;
|
||||
var spaceAfterBlockQuote = /^\s*(?:>\s+)+\S/;
|
||||
var spaceBeforeHeaderRe = /^\s+\S/;
|
||||
var spaceInsideCodeRe = /`(?:(?:\s[^`]*)|(?:[^`]*\s))`/;
|
||||
var spaceInsideEmphasisRe = /(\*\*?|__?)(?:(?:\s.+)|(?:.+\s))\1/;
|
||||
|
|
|
@ -57,3 +57,19 @@ Text
|
|||
Text
|
||||
|
||||
>> >> Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> > Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> > Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> > Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> > Text {MD027}
|
||||
|
|
|
@ -21,3 +21,15 @@ Test the first line being indented too much:
|
|||
> Foo {MD027}
|
||||
> Bar {MD027}
|
||||
> Baz
|
||||
|
||||
Test spaces before the blockquote:
|
||||
|
||||
> Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> Text {MD027}
|
||||
|
||||
Text
|
||||
|
||||
> Text {MD027}
|
||||
|
|
|
@ -11,3 +11,9 @@ Text
|
|||
|
||||
1. Alpha
|
||||
2. Beta
|
||||
|
||||
> > Multiple spaces, multiple blockquotes
|
||||
> >
|
||||
> > > Multiple spaces, multiple blockquotes
|
||||
> > >
|
||||
> > > Multiple spaces, multiple blockquotes
|
||||
|
|
|
@ -53,6 +53,33 @@
|
|||
"errorContext": "> Multiple spaces",
|
||||
"errorRange": [1, 4]
|
||||
},
|
||||
{
|
||||
"lineNumber": 15,
|
||||
"ruleName": "MD027",
|
||||
"ruleAlias": "no-multiple-space-blockquote",
|
||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||
"errorDetail": null,
|
||||
"errorContext": "> > Multiple spaces, multiple...",
|
||||
"errorRange": [ 1, 6 ]
|
||||
},
|
||||
{
|
||||
"lineNumber": 17,
|
||||
"ruleName": "MD027",
|
||||
"ruleAlias": "no-multiple-space-blockquote",
|
||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||
"errorDetail": null,
|
||||
"errorContext": "> > > Multiple spaces, multip...",
|
||||
"errorRange": [ 1, 8 ]
|
||||
},
|
||||
{
|
||||
"lineNumber": 19,
|
||||
"ruleName": "MD027",
|
||||
"ruleAlias": "no-multiple-space-blockquote",
|
||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||
"errorDetail": null,
|
||||
"errorContext": "> > > Multiple spaces, multip...",
|
||||
"errorRange": [ 1, 8 ]
|
||||
},
|
||||
{
|
||||
"lineNumber": 9,
|
||||
"ruleName": "MD028",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue