mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Reimplement MD035/hr-style using micromark tokens (fixes #736).
This commit is contained in:
parent
f1e33672ba
commit
8057f3d37e
7 changed files with 508 additions and 25 deletions
|
@ -5129,28 +5129,37 @@ module.exports = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
||||||
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||||
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||||
var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"),
|
var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"),
|
||||||
addErrorDetailIf = _require.addErrorDetailIf,
|
addErrorDetailIf = _require.addErrorDetailIf;
|
||||||
filterTokens = _require.filterTokens;
|
var _require2 = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/micromark.cjs"),
|
||||||
|
filterByTypes = _require2.filterByTypes;
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": ["MD035", "hr-style"],
|
"names": ["MD035", "hr-style"],
|
||||||
"description": "Horizontal rule style",
|
"description": "Horizontal rule style",
|
||||||
"tags": ["hr"],
|
"tags": ["hr"],
|
||||||
"function": function MD035(params, onError) {
|
"function": function MD035(params, onError) {
|
||||||
var style = String(params.config.style || "consistent").trim();
|
var style = String(params.config.style || "consistent").trim();
|
||||||
filterTokens(params, "hr", function (token) {
|
var thematicBreaks = filterByTypes(params.parsers.micromark.tokens, ["thematicBreak"]);
|
||||||
var line = token.line,
|
var _iterator = _createForOfIteratorHelper(thematicBreaks),
|
||||||
lineNumber = token.lineNumber;
|
_step;
|
||||||
var markup = token.markup;
|
try {
|
||||||
var match = line.match(/[_*\-\s]+$/);
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||||
if (match) {
|
var token = _step.value;
|
||||||
markup = match[0].trim();
|
var startLine = token.startLine,
|
||||||
}
|
text = token.text;
|
||||||
if (style === "consistent") {
|
if (style === "consistent") {
|
||||||
style = markup;
|
style = text;
|
||||||
|
}
|
||||||
|
addErrorDetailIf(onError, startLine, style, text);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
_iterator.e(err);
|
||||||
|
} finally {
|
||||||
|
_iterator.f();
|
||||||
}
|
}
|
||||||
addErrorDetailIf(onError, lineNumber, style, markup);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
20
lib/md035.js
20
lib/md035.js
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { addErrorDetailIf, filterTokens } = require("../helpers");
|
const { addErrorDetailIf } = require("../helpers");
|
||||||
|
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": [ "MD035", "hr-style" ],
|
"names": [ "MD035", "hr-style" ],
|
||||||
|
@ -10,17 +11,14 @@ module.exports = {
|
||||||
"tags": [ "hr" ],
|
"tags": [ "hr" ],
|
||||||
"function": function MD035(params, onError) {
|
"function": function MD035(params, onError) {
|
||||||
let style = String(params.config.style || "consistent").trim();
|
let style = String(params.config.style || "consistent").trim();
|
||||||
filterTokens(params, "hr", (token) => {
|
const thematicBreaks =
|
||||||
const { line, lineNumber } = token;
|
filterByTypes(params.parsers.micromark.tokens, [ "thematicBreak" ]);
|
||||||
let { markup } = token;
|
for (const token of thematicBreaks) {
|
||||||
const match = line.match(/[_*\-\s]+$/);
|
const { startLine, text } = token;
|
||||||
if (match) {
|
|
||||||
markup = match[0].trim();
|
|
||||||
}
|
|
||||||
if (style === "consistent") {
|
if (style === "consistent") {
|
||||||
style = markup;
|
style = text;
|
||||||
|
}
|
||||||
|
addErrorDetailIf(onError, startLine, style, text);
|
||||||
}
|
}
|
||||||
addErrorDetailIf(onError, lineNumber, style, markup);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
31
test/hr-in-list-dash.md
Normal file
31
test/hr-in-list-dash.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# HR in List, Dash
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
{MD035:5} {MD035:7}
|
||||||
|
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->
|
||||||
|
|
||||||
|
- list
|
||||||
|
- ---
|
||||||
|
- list
|
||||||
|
- ***
|
||||||
|
- list
|
||||||
|
- ___
|
||||||
|
- list
|
||||||
|
|
||||||
|
{MD035:14} {MD035:16} {MD035:18}
|
||||||
|
|
||||||
|
* list
|
||||||
|
* ---
|
||||||
|
* list
|
||||||
|
* ***
|
||||||
|
* list
|
||||||
|
* ___
|
||||||
|
* list
|
||||||
|
|
||||||
|
{MD035:26} {MD035:28}
|
31
test/hr-in-list-star.md
Normal file
31
test/hr-in-list-star.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# HR in List, Star
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
{MD035:5} {MD035:7}
|
||||||
|
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->
|
||||||
|
|
||||||
|
- list
|
||||||
|
- ---
|
||||||
|
- list
|
||||||
|
- ***
|
||||||
|
- list
|
||||||
|
- ___
|
||||||
|
- list
|
||||||
|
|
||||||
|
{MD035:14} {MD035:18}
|
||||||
|
|
||||||
|
* list
|
||||||
|
* ---
|
||||||
|
* list
|
||||||
|
* ***
|
||||||
|
* list
|
||||||
|
* ___
|
||||||
|
* list
|
||||||
|
|
||||||
|
{MD035:24} {MD035:26} {MD035:28}
|
31
test/hr-in-list-under.md
Normal file
31
test/hr-in-list-under.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# HR in List, Under
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
{MD035:5} {MD035:7}
|
||||||
|
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->
|
||||||
|
|
||||||
|
- list
|
||||||
|
- ---
|
||||||
|
- list
|
||||||
|
- ***
|
||||||
|
- list
|
||||||
|
- ___
|
||||||
|
- list
|
||||||
|
|
||||||
|
{MD035:14} {MD035:16}
|
||||||
|
|
||||||
|
* list
|
||||||
|
* ---
|
||||||
|
* list
|
||||||
|
* ***
|
||||||
|
* list
|
||||||
|
* ___
|
||||||
|
* list
|
||||||
|
|
||||||
|
{MD035:24} {MD035:26}
|
|
@ -15312,6 +15312,389 @@ Generated by [AVA](https://avajs.dev).
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## hr-in-list-dash.md
|
||||||
|
|
||||||
|
> Snapshot 1
|
||||||
|
|
||||||
|
{
|
||||||
|
errors: [
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 5,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 7,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: - ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 14,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 16,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 18,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: * ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 26,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ---; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 28,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
fixed: `# HR in List, Dash␊
|
||||||
|
␊
|
||||||
|
---␊
|
||||||
|
␊
|
||||||
|
***␊
|
||||||
|
␊
|
||||||
|
___␊
|
||||||
|
␊
|
||||||
|
{MD035:5} {MD035:7}␊
|
||||||
|
␊
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->␊
|
||||||
|
␊
|
||||||
|
- list␊
|
||||||
|
- ---␊
|
||||||
|
- list␊
|
||||||
|
- ***␊
|
||||||
|
- list␊
|
||||||
|
- ___␊
|
||||||
|
- list␊
|
||||||
|
␊
|
||||||
|
{MD035:14} {MD035:16} {MD035:18}␊
|
||||||
|
␊
|
||||||
|
* list␊
|
||||||
|
* ---␊
|
||||||
|
* list␊
|
||||||
|
* ***␊
|
||||||
|
* list␊
|
||||||
|
* ___␊
|
||||||
|
* list␊
|
||||||
|
␊
|
||||||
|
{MD035:26} {MD035:28}␊
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
|
||||||
|
## hr-in-list-star.md
|
||||||
|
|
||||||
|
> Snapshot 1
|
||||||
|
|
||||||
|
{
|
||||||
|
errors: [
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 5,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 7,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: - ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 14,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 18,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 24,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: * ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 26,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ***; Actual: ___',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 28,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
fixed: `# HR in List, Star␊
|
||||||
|
␊
|
||||||
|
***␊
|
||||||
|
␊
|
||||||
|
___␊
|
||||||
|
␊
|
||||||
|
---␊
|
||||||
|
␊
|
||||||
|
{MD035:5} {MD035:7}␊
|
||||||
|
␊
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->␊
|
||||||
|
␊
|
||||||
|
- list␊
|
||||||
|
- ---␊
|
||||||
|
- list␊
|
||||||
|
- ***␊
|
||||||
|
- list␊
|
||||||
|
- ___␊
|
||||||
|
- list␊
|
||||||
|
␊
|
||||||
|
{MD035:14} {MD035:18}␊
|
||||||
|
␊
|
||||||
|
* list␊
|
||||||
|
* ---␊
|
||||||
|
* list␊
|
||||||
|
* ***␊
|
||||||
|
* list␊
|
||||||
|
* ___␊
|
||||||
|
* list␊
|
||||||
|
␊
|
||||||
|
{MD035:24} {MD035:26} {MD035:28}␊
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
|
||||||
|
## hr-in-list-under.md
|
||||||
|
|
||||||
|
> Snapshot 1
|
||||||
|
|
||||||
|
{
|
||||||
|
errors: [
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 5,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 7,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: - ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 14,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 16,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: ---',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 24,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorContext: null,
|
||||||
|
errorDetail: 'Expected: ___; Actual: * ***',
|
||||||
|
errorRange: null,
|
||||||
|
fixInfo: null,
|
||||||
|
lineNumber: 26,
|
||||||
|
ruleDescription: 'Horizontal rule style',
|
||||||
|
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md035.md',
|
||||||
|
ruleNames: [
|
||||||
|
'MD035',
|
||||||
|
'hr-style',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
fixed: `# HR in List, Under␊
|
||||||
|
␊
|
||||||
|
___␊
|
||||||
|
␊
|
||||||
|
---␊
|
||||||
|
␊
|
||||||
|
***␊
|
||||||
|
␊
|
||||||
|
{MD035:5} {MD035:7}␊
|
||||||
|
␊
|
||||||
|
<!-- markdownlint-disable blanks-around-lists ul-style -->␊
|
||||||
|
␊
|
||||||
|
- list␊
|
||||||
|
- ---␊
|
||||||
|
- list␊
|
||||||
|
- ***␊
|
||||||
|
- list␊
|
||||||
|
- ___␊
|
||||||
|
- list␊
|
||||||
|
␊
|
||||||
|
{MD035:14} {MD035:16}␊
|
||||||
|
␊
|
||||||
|
* list␊
|
||||||
|
* ---␊
|
||||||
|
* list␊
|
||||||
|
* ***␊
|
||||||
|
* list␊
|
||||||
|
* ___␊
|
||||||
|
* list␊
|
||||||
|
␊
|
||||||
|
{MD035:24} {MD035:26}␊
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
|
||||||
## hr-style-custom.md
|
## hr-style-custom.md
|
||||||
|
|
||||||
> Snapshot 1
|
> Snapshot 1
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue