mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Reimplement MD027/no-multiple-space-blockquote using micromark tokens.
This commit is contained in:
parent
a2997f1595
commit
730ae9a96f
11 changed files with 248 additions and 167 deletions
|
@ -1619,7 +1619,7 @@ module.exports = {
|
|||
getHeadingLevel,
|
||||
getHtmlTagInfo,
|
||||
getMicromarkEvents,
|
||||
getSiblingLists: getSiblingTokens,
|
||||
getSiblingTokens,
|
||||
getTokenParentOfType,
|
||||
getTokenTextByType,
|
||||
inHtmlFlow,
|
||||
|
@ -4543,54 +4543,35 @@ module.exports = {
|
|||
|
||||
|
||||
|
||||
const { addErrorContext, newLineRe } = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
||||
|
||||
const spaceAfterBlockQuoteRe = /^((?:\s*>)+)(\s{2,})\S/;
|
||||
const { addErrorContext } = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
||||
const { getSiblingTokens } = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD027", "no-multiple-space-blockquote" ],
|
||||
"names": ["MD027", "no-multiple-space-blockquote"],
|
||||
"description": "Multiple spaces after blockquote symbol",
|
||||
"tags": [ "blockquote", "whitespace", "indentation" ],
|
||||
"tags": ["blockquote", "whitespace", "indentation"],
|
||||
"function": function MD027(params, onError) {
|
||||
let blockquoteNesting = 0;
|
||||
let listItemNesting = 0;
|
||||
for (const token of params.parsers.markdownit.tokens) {
|
||||
const { content, lineNumber, type } = token;
|
||||
if (type === "blockquote_open") {
|
||||
blockquoteNesting++;
|
||||
} else if (type === "blockquote_close") {
|
||||
blockquoteNesting--;
|
||||
} else if (type === "list_item_open") {
|
||||
listItemNesting++;
|
||||
} else if (type === "list_item_close") {
|
||||
listItemNesting--;
|
||||
} else if ((type === "inline") && blockquoteNesting) {
|
||||
const lineCount = content.split(newLineRe).length;
|
||||
for (let i = 0; i < lineCount; i++) {
|
||||
const line = params.lines[lineNumber + i - 1];
|
||||
const match = line.match(spaceAfterBlockQuoteRe);
|
||||
if (match) {
|
||||
const [
|
||||
fullMatch,
|
||||
{ "length": blockquoteLength },
|
||||
{ "length": spaceLength }
|
||||
] = match;
|
||||
if (!listItemNesting || (fullMatch[fullMatch.length - 1] === ">")) {
|
||||
addErrorContext(
|
||||
onError,
|
||||
lineNumber + i,
|
||||
line,
|
||||
null,
|
||||
null,
|
||||
[ 1, fullMatch.length ],
|
||||
{
|
||||
"editColumn": blockquoteLength + 1,
|
||||
"deleteCount": spaceLength - 1
|
||||
}
|
||||
);
|
||||
for (const siblings of getSiblingTokens(params.parsers.micromark.tokens)) {
|
||||
let previousType = null;
|
||||
for (const token of siblings) {
|
||||
const { type } = token;
|
||||
if ((type === "linePrefix") && (previousType === "blockQuotePrefix")) {
|
||||
const { endColumn, startColumn, startLine, text } = token;
|
||||
const line = params.lines[startLine - 1];
|
||||
addErrorContext(
|
||||
onError,
|
||||
startLine,
|
||||
line,
|
||||
null,
|
||||
null,
|
||||
[ 1, Math.min(endColumn, line.length) ],
|
||||
{
|
||||
"editColumn": startColumn,
|
||||
"deleteCount": text.length
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
previousType = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4611,14 +4592,14 @@ module.exports = {
|
|||
|
||||
|
||||
const { addError } = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
||||
const { getSiblingLists } = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/micromark.cjs");
|
||||
const { getSiblingTokens } = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD028", "no-blanks-blockquote" ],
|
||||
"description": "Blank line inside blockquote",
|
||||
"tags": [ "blockquote", "whitespace" ],
|
||||
"function": function MD028(params, onError) {
|
||||
for (const siblings of getSiblingLists(params.parsers.micromark.tokens)) {
|
||||
for (const siblings of getSiblingTokens(params.parsers.micromark.tokens)) {
|
||||
let errorLineNumbers = null;
|
||||
for (const sibling of siblings) {
|
||||
switch (sibling.type) {
|
||||
|
|
|
@ -441,7 +441,7 @@ module.exports = {
|
|||
getHeadingLevel,
|
||||
getHtmlTagInfo,
|
||||
getMicromarkEvents,
|
||||
getSiblingLists: getSiblingTokens,
|
||||
getSiblingTokens,
|
||||
getTokenParentOfType,
|
||||
getTokenTextByType,
|
||||
inHtmlFlow,
|
||||
|
|
65
lib/md027.js
65
lib/md027.js
|
@ -2,54 +2,35 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { addErrorContext, newLineRe } = require("../helpers");
|
||||
|
||||
const spaceAfterBlockQuoteRe = /^((?:\s*>)+)(\s{2,})\S/;
|
||||
const { addErrorContext } = require("../helpers");
|
||||
const { getSiblingTokens } = require("../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD027", "no-multiple-space-blockquote" ],
|
||||
"names": ["MD027", "no-multiple-space-blockquote"],
|
||||
"description": "Multiple spaces after blockquote symbol",
|
||||
"tags": [ "blockquote", "whitespace", "indentation" ],
|
||||
"tags": ["blockquote", "whitespace", "indentation"],
|
||||
"function": function MD027(params, onError) {
|
||||
let blockquoteNesting = 0;
|
||||
let listItemNesting = 0;
|
||||
for (const token of params.parsers.markdownit.tokens) {
|
||||
const { content, lineNumber, type } = token;
|
||||
if (type === "blockquote_open") {
|
||||
blockquoteNesting++;
|
||||
} else if (type === "blockquote_close") {
|
||||
blockquoteNesting--;
|
||||
} else if (type === "list_item_open") {
|
||||
listItemNesting++;
|
||||
} else if (type === "list_item_close") {
|
||||
listItemNesting--;
|
||||
} else if ((type === "inline") && blockquoteNesting) {
|
||||
const lineCount = content.split(newLineRe).length;
|
||||
for (let i = 0; i < lineCount; i++) {
|
||||
const line = params.lines[lineNumber + i - 1];
|
||||
const match = line.match(spaceAfterBlockQuoteRe);
|
||||
if (match) {
|
||||
const [
|
||||
fullMatch,
|
||||
{ "length": blockquoteLength },
|
||||
{ "length": spaceLength }
|
||||
] = match;
|
||||
if (!listItemNesting || (fullMatch[fullMatch.length - 1] === ">")) {
|
||||
addErrorContext(
|
||||
onError,
|
||||
lineNumber + i,
|
||||
line,
|
||||
null,
|
||||
null,
|
||||
[ 1, fullMatch.length ],
|
||||
{
|
||||
"editColumn": blockquoteLength + 1,
|
||||
"deleteCount": spaceLength - 1
|
||||
}
|
||||
);
|
||||
for (const siblings of getSiblingTokens(params.parsers.micromark.tokens)) {
|
||||
let previousType = null;
|
||||
for (const token of siblings) {
|
||||
const { type } = token;
|
||||
if ((type === "linePrefix") && (previousType === "blockQuotePrefix")) {
|
||||
const { endColumn, startColumn, startLine, text } = token;
|
||||
const line = params.lines[startLine - 1];
|
||||
addErrorContext(
|
||||
onError,
|
||||
startLine,
|
||||
line,
|
||||
null,
|
||||
null,
|
||||
[ 1, Math.min(endColumn, line.length) ],
|
||||
{
|
||||
"editColumn": startColumn,
|
||||
"deleteCount": text.length
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
previousType = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
"use strict";
|
||||
|
||||
const { addError } = require("../helpers");
|
||||
const { getSiblingLists } = require("../helpers/micromark.cjs");
|
||||
const { getSiblingTokens } = require("../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD028", "no-blanks-blockquote" ],
|
||||
"description": "Blank line inside blockquote",
|
||||
"tags": [ "blockquote", "whitespace" ],
|
||||
"function": function MD028(params, onError) {
|
||||
for (const siblings of getSiblingLists(params.parsers.micromark.tokens)) {
|
||||
for (const siblings of getSiblingTokens(params.parsers.micromark.tokens)) {
|
||||
let errorLineNumbers = null;
|
||||
for (const sibling of siblings) {
|
||||
switch (sibling.type) {
|
||||
|
|
|
@ -30,7 +30,7 @@ Text
|
|||
- Item
|
||||
- Item
|
||||
item
|
||||
> ## Quoted indented sub-heading in list {MD022} {MD023}
|
||||
> ## Quoted indented sub-heading in list {MD022} {MD023} {MD027}
|
||||
- Item
|
||||
|
||||
Text
|
||||
|
|
|
@ -39,3 +39,10 @@ Text
|
|||
Text
|
||||
|
||||
> Text {MD027}
|
||||
|
||||
Test nothing in the blockquote:
|
||||
|
||||
<!-- markdownlint-disable no-trailing-spaces -->
|
||||
|
||||
>
|
||||
{MD027:-1}
|
||||
|
|
|
@ -65,7 +65,7 @@ Text
|
|||
> * Item {MD004}
|
||||
> * Item {MD004} {MD030}
|
||||
> * Item {MD004} {MD005} {MD007}
|
||||
> * Item {MD004} {MD005} {MD007}
|
||||
> * Item {MD004} {MD005} {MD007} {MD027}
|
||||
> * Item {MD004}
|
||||
> * Item {MD004}
|
||||
> * Item {MD004}
|
||||
|
@ -182,7 +182,7 @@ Text
|
|||
Text
|
||||
|
||||
> + list in blockquote
|
||||
> + list in blockquote {MD005} {MD007}
|
||||
> + list in blockquote {MD005} {MD007} {MD027}
|
||||
> + list in blockquote
|
||||
> + sublist in blockquote
|
||||
> + sublist in blockquote {MD005} {MD007}
|
||||
|
|
|
@ -8,4 +8,52 @@ Generated by [AVA](https://avajs.dev).
|
|||
|
||||
> Expected linting violations
|
||||
|
||||
''
|
||||
`test-repos/dotnet-docs/docs/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer.md: 43: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`xml"]␊
|
||||
test-repos/dotnet-docs/docs/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer.md: 44: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > <ItemGroup>"]␊
|
||||
test-repos/dotnet-docs/docs/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer.md: 45: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > <SupportedPlatform Incl..."]␊
|
||||
test-repos/dotnet-docs/docs/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer.md: 46: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > </ItemGroup>"]␊
|
||||
test-repos/dotnet-docs/docs/core/install/templates.md: 222: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Determining projects t..."]␊
|
||||
test-repos/dotnet-docs/docs/core/install/templates.md: 223: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Restore completed in 1..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 174: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`cpp"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 175: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > cl /clr:pure /LN String..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 176: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > cl /clr:pure Client.cpp..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 179: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`csharp"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 180: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > csc /t:module Stringer...."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 181: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > csc Client.cs /addmodul..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 184: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`vb"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 185: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > vbc /t:module Stringer...."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 186: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > vbc Client.vb /addmodul..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 191: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`cpp"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 192: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > cl /clr:pure /LN String..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 193: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > cl /clr:pure Client.cpp..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 196: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`csharp"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 197: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > csc /out:Client.exe Cli..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 200: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`vb"]␊
|
||||
test-repos/dotnet-docs/docs/framework/app-domains/build-multifile-assembly.md: 201: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > vbc /out:Client.exe Cli..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/data/adonet/sql/linq/how-to-map-database-relationships.md: 32: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Objects in [!INCLUDE[vb..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/wcf/feature-details/how-to-create-a-basic-wcf-web-http-service.md: 47: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Adding a non-SOAP endpo..."]␊
|
||||
test-repos/dotnet-docs/docs/framework/wcf/privacy-information.md: 166: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > "]␊
|
||||
test-repos/dotnet-docs/docs/framework/wcf/privacy-information.md: 202: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > "]␊
|
||||
test-repos/dotnet-docs/docs/framework/wcf/privacy-information.md: 219: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > "]␊
|
||||
test-repos/dotnet-docs/docs/framework/wcf/privacy-information.md: 226: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > "]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/code-analysis/quality-rules/ca1416.md: 107: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`xml"]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/code-analysis/quality-rules/ca1416.md: 108: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > <ItemGroup>"]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/code-analysis/quality-rules/ca1416.md: 109: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > <SupportedPlatform In..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/code-analysis/quality-rules/ca1416.md: 110: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > </ItemGroup>"]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/includes/csharp-interactive-with-utc-note.md: 4: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: "> "]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-invalidoperationexception.md: 184: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Calling the <xref:Syste..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-reflection-emit-dynamicmethod.md: 19: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > When you specify the mo..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-single.md: 103: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > <xref:System.Single.Eps..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-text-stringbuilder.md: 186: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > If you adopt this appro..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-threading-readerwriterlockslim.md: 36: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Blocking new readers wh..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-type-gettype.md: 38: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > Using methods from unkn..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-typeinitializationexception.md: 97: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > In this example, a <xref..."]␊
|
||||
test-repos/dotnet-docs/docs/fundamentals/runtime-libraries/system-version.md: 79: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > The Publish Version of ..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 277: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > 1. Multiply the top a..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 278: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > 1. Divide the top and..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 280: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > For example, given th..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 282: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > \`\`\`csharp"]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 283: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > var top = originalIma..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 284: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > var bottom = original..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 285: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > var left = originalIm..."]␊
|
||||
test-repos/dotnet-docs/docs/machine-learning/tutorials/object-detection-model-builder.md: 286: MD027/no-multiple-space-blockquote Multiple spaces after blockquote symbol [Context: " > var right = originalI..."]`
|
||||
|
|
Binary file not shown.
|
@ -694,7 +694,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 8,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -713,7 +713,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 15,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -732,7 +732,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -751,7 +751,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 19,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5087,7 +5087,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
},
|
||||
{
|
||||
errorContext: '> ## Quoted indented sub-heading in list {MD022} {MD023}',
|
||||
errorContext: '> ## Quoted indented sub-heading in list {MD022} {MD023} {MD027}',
|
||||
errorDetail: 'Expected: 1; Actual: 0; Above',
|
||||
errorRange: null,
|
||||
fixInfo: {
|
||||
|
@ -5103,7 +5103,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
},
|
||||
{
|
||||
errorContext: '> ## Quoted indented sub-heading in list {MD022} {MD023}',
|
||||
errorContext: '> ## Quoted indented sub-heading in list {MD022} {MD023} {MD027}',
|
||||
errorDetail: 'Expected: 1; Actual: 0; Below',
|
||||
errorRange: null,
|
||||
fixInfo: {
|
||||
|
@ -5387,7 +5387,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5397,6 +5397,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' > ## Quoted indented sub-he...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
6,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 33,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md027.md',
|
||||
ruleNames: [
|
||||
'MD027',
|
||||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Heading␊
|
||||
␊
|
||||
|
@ -5414,7 +5433,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text␊
|
||||
␊
|
||||
># Quoted indented sub-heading {MD023} {MD027}␊
|
||||
> ## Quoted indented sub-heading {MD023} {MD027}␊
|
||||
␊
|
||||
Text␊
|
||||
␊
|
||||
|
@ -5437,7 +5456,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
- Item␊
|
||||
item␊
|
||||
␊
|
||||
># Quoted indented sub-heading in list {MD022} {MD023}␊
|
||||
> ## Quoted indented sub-heading in list {MD022} {MD023} {MD027}␊
|
||||
␊
|
||||
- Item␊
|
||||
␊
|
||||
|
@ -5508,7 +5527,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 3,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5527,7 +5546,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5546,7 +5565,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 7,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5565,7 +5584,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 11,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5584,7 +5603,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 13,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5603,7 +5622,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 15,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5622,7 +5641,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5641,7 +5660,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 19,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5660,7 +5679,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 23,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5679,7 +5698,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 25,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5698,7 +5717,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 27,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5717,7 +5736,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 29,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5736,7 +5755,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 31,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5755,7 +5774,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 35,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5774,7 +5793,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 5,
|
||||
editColumn: 6,
|
||||
},
|
||||
lineNumber: 39,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5793,7 +5812,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 43,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5812,7 +5831,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 47,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5831,7 +5850,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 51,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5850,7 +5869,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 55,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5869,7 +5888,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 59,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5888,7 +5907,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 5,
|
||||
editColumn: 6,
|
||||
},
|
||||
lineNumber: 63,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5907,7 +5926,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 67,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5926,7 +5945,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 7,
|
||||
editColumn: 8,
|
||||
},
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -5945,7 +5964,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6190,7 +6209,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 6,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6209,7 +6228,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 7,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6228,7 +6247,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 14,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6247,7 +6266,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 15,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6266,7 +6285,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 16,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6285,7 +6304,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6304,7 +6323,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 27,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6323,7 +6342,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 28,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6342,7 +6361,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 33,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6361,7 +6380,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 37,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6380,7 +6399,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 5,
|
||||
editColumn: 6,
|
||||
},
|
||||
lineNumber: 41,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -6390,6 +6409,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '> ',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
3,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 47,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md027.md',
|
||||
ruleNames: [
|
||||
'MD027',
|
||||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# blockquote_spaces␊
|
||||
␊
|
||||
|
@ -6432,6 +6470,13 @@ Generated by [AVA](https://avajs.dev).
|
|||
Text␊
|
||||
␊
|
||||
> Text {MD027}␊
|
||||
␊
|
||||
Test nothing in the blockquote:␊
|
||||
␊
|
||||
<!-- markdownlint-disable no-trailing-spaces -->␊
|
||||
␊
|
||||
> ␊
|
||||
{MD027:-1}␊
|
||||
`,
|
||||
}
|
||||
|
||||
|
@ -6819,7 +6864,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 42,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33578,6 +33623,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'ul-indent',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' > * Item {MD004} {MD005} {...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
7,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
},
|
||||
lineNumber: 68,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md027.md',
|
||||
ruleNames: [
|
||||
'MD027',
|
||||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' > > - Item {MD004} {MD005} ...',
|
||||
errorDetail: null,
|
||||
|
@ -33587,7 +33651,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 86,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33606,7 +33670,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 90,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33625,7 +33689,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 91,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33644,7 +33708,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 97,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33663,7 +33727,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 6,
|
||||
editColumn: 7,
|
||||
},
|
||||
lineNumber: 100,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33682,7 +33746,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 101,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
@ -33692,6 +33756,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' > + list in blockquote {MD0...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
6,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 5,
|
||||
},
|
||||
lineNumber: 185,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md027.md',
|
||||
ruleNames: [
|
||||
'MD027',
|
||||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: 1; Actual: 2',
|
||||
|
@ -33977,7 +34060,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
> + Item {MD004}␊
|
||||
> + Item {MD004} {MD030}␊
|
||||
> + Item {MD004} {MD005} {MD007}␊
|
||||
> + Item {MD004} {MD005} {MD007}␊
|
||||
> + Item {MD004} {MD005} {MD007} {MD027}␊
|
||||
> + Item {MD004}␊
|
||||
> + Item {MD004}␊
|
||||
> + Item {MD004}␊
|
||||
|
@ -34097,7 +34180,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
Text␊
|
||||
␊
|
||||
> + list in blockquote␊
|
||||
> + list in blockquote {MD005} {MD007}␊
|
||||
> + list in blockquote {MD005} {MD007} {MD027}␊
|
||||
> + list in blockquote␊
|
||||
> + sublist in blockquote␊
|
||||
> + sublist in blockquote {MD005} {MD007}␊
|
||||
|
@ -54686,26 +54769,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 2,
|
||||
},
|
||||
lineNumber: 132,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md027.md',
|
||||
ruleNames: [
|
||||
'MD027',
|
||||
'no-multiple-space-blockquote',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '> {MD055} | {MD027} |',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 132,
|
||||
ruleDescription: 'Multiple spaces after blockquote symbol',
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue