markdownlint 0.21.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +1 -0
- package/LICENSE +1 -1
- package/README.md +140 -80
- package/demo/markdownlint-browser.js +1209 -1701
- package/doc/Prettier.md +23 -0
- package/doc/Rules.md +121 -76
- package/helpers/LICENSE +1 -1
- package/helpers/helpers.js +126 -37
- package/helpers/package.json +1 -1
- package/lib/cache.js +18 -9
- package/lib/markdownlint.d.ts +28 -12
- package/lib/markdownlint.js +185 -62
- package/lib/md002.js +1 -1
- package/lib/md004.js +46 -13
- package/lib/md006.js +1 -1
- package/lib/md009.js +25 -23
- package/lib/md010.js +5 -1
- package/lib/md011.js +31 -27
- package/lib/md018.js +1 -1
- package/lib/md019.js +1 -1
- package/lib/md020.js +1 -1
- package/lib/md021.js +1 -1
- package/lib/md023.js +1 -1
- package/lib/md025.js +1 -1
- package/lib/md026.js +7 -4
- package/lib/md028.js +1 -9
- package/lib/md032.js +2 -2
- package/lib/md037.js +35 -9
- package/lib/md039.js +2 -2
- package/lib/md041.js +14 -3
- package/lib/md043.js +27 -11
- package/lib/md044.js +54 -71
- package/lib/rules.js +2 -1
- package/package.json +39 -32
- package/schema/.markdownlint.jsonc +252 -0
- package/schema/.markdownlint.yaml +227 -0
- package/schema/markdownlint-config-schema.json +36 -23
- package/schema/build-config-schema.js +0 -409
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/*! markdownlint 0.24.0 https://github.com/DavidAnson/markdownlint @license MIT */
|
|
2
|
+
var markdownlint;
|
|
3
|
+
/******/ (() => { // webpackBootstrap
|
|
4
|
+
/******/ var __webpack_modules__ = ({
|
|
5
|
+
|
|
6
|
+
/***/ "../lib sync recursive":
|
|
7
|
+
/*!********************!*\
|
|
8
|
+
!*** ../lib/ sync ***!
|
|
9
|
+
\********************/
|
|
10
|
+
/***/ ((module) => {
|
|
11
|
+
|
|
12
|
+
function webpackEmptyContext(req) {
|
|
13
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
14
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
15
|
+
throw e;
|
|
10
16
|
}
|
|
17
|
+
webpackEmptyContext.keys = () => ([]);
|
|
18
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
19
|
+
webpackEmptyContext.id = "../lib sync recursive";
|
|
20
|
+
module.exports = webpackEmptyContext;
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
/***/ }),
|
|
23
|
+
|
|
24
|
+
/***/ "../helpers/helpers.js":
|
|
25
|
+
/*!*****************************!*\
|
|
26
|
+
!*** ../helpers/helpers.js ***!
|
|
27
|
+
\*****************************/
|
|
28
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
19
29
|
|
|
20
|
-
},{"util":57}],2:[function(require,module,exports){
|
|
21
|
-
// @ts-check
|
|
22
30
|
"use strict";
|
|
23
|
-
|
|
31
|
+
// @ts-check
|
|
32
|
+
|
|
33
|
+
var os = __webpack_require__(/*! os */ "?591e");
|
|
24
34
|
// Regular expression for matching common newline characters
|
|
25
35
|
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
|
|
26
36
|
var newLineRe = /\r\n?|\n/g;
|
|
@@ -28,11 +38,11 @@ module.exports.newLineRe = newLineRe;
|
|
|
28
38
|
// Regular expression for matching common front matter (YAML and TOML)
|
|
29
39
|
module.exports.frontMatterRe =
|
|
30
40
|
// eslint-disable-next-line max-len
|
|
31
|
-
/((^---\s*$[^]*?^---\s*$)|(^\+\+\+\s*$[^]*?^(\+\+\+|\.\.\.)\s*$))(\r\n|\r|\n|$)/m;
|
|
41
|
+
/((^---\s*$[^]*?^---\s*$)|(^\+\+\+\s*$[^]*?^(\+\+\+|\.\.\.)\s*$)|(^\{\s*$[^]*?^\}\s*$))(\r\n|\r|\n|$)/m;
|
|
32
42
|
// Regular expression for matching inline disable/enable comments
|
|
33
43
|
var inlineCommentRe =
|
|
34
44
|
// eslint-disable-next-line max-len
|
|
35
|
-
/<!--\s*markdownlint-(?:(?:(disable|enable|capture|restore|disable-file|enable-file)((?:\s+[a-z0-9_-]+)*))|(?:(configure-file)\s+([\s\S]*?)))\s*-->/ig;
|
|
45
|
+
/<!--\s*markdownlint-(?:(?:(disable|enable|capture|restore|disable-file|enable-file|disable-next-line)((?:\s+[a-z0-9_-]+)*))|(?:(configure-file)\s+([\s\S]*?)))\s*-->/ig;
|
|
36
46
|
module.exports.inlineCommentRe = inlineCommentRe;
|
|
37
47
|
// Regular expressions for range matching
|
|
38
48
|
module.exports.bareUrlRe = /(?:http|ftp)s?:\/\/[^\s\]"']*(?:\/|[^\s\]"'\W])/ig;
|
|
@@ -41,11 +51,15 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
|
|
|
41
51
|
// Regular expression for all instances of emphasis markers
|
|
42
52
|
var emphasisMarkersRe = /[_*]/g;
|
|
43
53
|
// Regular expression for inline links and shortcut reference links
|
|
44
|
-
var linkRe =
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
var linkRe = /(\[(?:[^[\]]|\[[^\]]*\])*\])(\(\S*\)|\[\S*\])?/g;
|
|
55
|
+
module.exports.linkRe = linkRe;
|
|
56
|
+
// Regular expression for link reference definition lines
|
|
57
|
+
module.exports.linkReferenceRe = /^ {0,3}\[[^\]]+]:\s.*$/;
|
|
47
58
|
// All punctuation characters (normal and full-width)
|
|
48
|
-
|
|
59
|
+
var allPunctuation = ".,;:!?。,;:!?";
|
|
60
|
+
module.exports.allPunctuation = allPunctuation;
|
|
61
|
+
// All punctuation characters without question mark (normal and full-width)
|
|
62
|
+
module.exports.allPunctuationNoQuestion = allPunctuation.replace(/[??]/gu, "");
|
|
49
63
|
// Returns true iff the input is a number
|
|
50
64
|
module.exports.isNumber = function isNumber(obj) {
|
|
51
65
|
return typeof obj === "number";
|
|
@@ -99,32 +113,47 @@ module.exports.includesSorted = function includesSorted(array, element) {
|
|
|
99
113
|
}
|
|
100
114
|
return false;
|
|
101
115
|
};
|
|
102
|
-
// Replaces the
|
|
116
|
+
// Replaces the content of properly-formatted CommonMark comments with "."
|
|
103
117
|
// This preserves the line/column information for the rest of the document
|
|
104
|
-
//
|
|
105
|
-
//
|
|
118
|
+
// https://spec.commonmark.org/0.29/#html-blocks
|
|
119
|
+
// https://spec.commonmark.org/0.29/#html-comment
|
|
106
120
|
var htmlCommentBegin = "<!--";
|
|
107
121
|
var htmlCommentEnd = "-->";
|
|
108
122
|
module.exports.clearHtmlCommentText = function clearHtmlCommentText(text) {
|
|
109
123
|
var i = 0;
|
|
110
124
|
while ((i = text.indexOf(htmlCommentBegin, i)) !== -1) {
|
|
111
|
-
var j = text.indexOf(htmlCommentEnd, i);
|
|
125
|
+
var j = text.indexOf(htmlCommentEnd, i + 2);
|
|
112
126
|
if (j === -1) {
|
|
113
127
|
// Un-terminated comments are treated as text
|
|
114
128
|
break;
|
|
115
129
|
}
|
|
116
|
-
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
// If the comment has content...
|
|
131
|
+
if (j > i + htmlCommentBegin.length) {
|
|
132
|
+
var k = i - 1;
|
|
133
|
+
while (text[k] === " ") {
|
|
134
|
+
k--;
|
|
135
|
+
}
|
|
136
|
+
// If comment is not within an indented code block...
|
|
137
|
+
if (k >= i - 4) {
|
|
138
|
+
var content = text.slice(i + htmlCommentBegin.length, j);
|
|
139
|
+
var isBlock = (k < 0) || (text[k] === "\n");
|
|
140
|
+
var isValid = isBlock ||
|
|
141
|
+
(!content.startsWith(">") && !content.startsWith("->") &&
|
|
142
|
+
!content.endsWith("-") && !content.includes("--"));
|
|
143
|
+
// If a valid block/inline comment...
|
|
144
|
+
if (isValid) {
|
|
145
|
+
var inlineCommentIndex = text
|
|
146
|
+
.slice(i, j + htmlCommentEnd.length)
|
|
147
|
+
.search(inlineCommentRe);
|
|
148
|
+
// If not a markdownlint inline directive...
|
|
149
|
+
if (inlineCommentIndex === -1) {
|
|
150
|
+
text =
|
|
151
|
+
text.slice(0, i + htmlCommentBegin.length) +
|
|
152
|
+
content.replace(/[^\r\n]/g, ".") +
|
|
153
|
+
text.slice(j);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
128
157
|
}
|
|
129
158
|
i = j + htmlCommentEnd.length;
|
|
130
159
|
}
|
|
@@ -169,7 +198,7 @@ module.exports.fencedCodeBlockStyleFor =
|
|
|
169
198
|
*/
|
|
170
199
|
function indentFor(token) {
|
|
171
200
|
var line = token.line.replace(/^[\s>]*(> |>)/, "");
|
|
172
|
-
return line.length - line.
|
|
201
|
+
return line.length - line.trimStart().length;
|
|
173
202
|
}
|
|
174
203
|
module.exports.indentFor = indentFor;
|
|
175
204
|
// Returns the heading style for a heading token
|
|
@@ -215,56 +244,75 @@ function filterTokens(params, type, handler) {
|
|
|
215
244
|
});
|
|
216
245
|
}
|
|
217
246
|
module.exports.filterTokens = filterTokens;
|
|
247
|
+
/**
|
|
248
|
+
* Returns whether a token is a math block (created by markdown-it-texmath).
|
|
249
|
+
*
|
|
250
|
+
* @param {Object} token MarkdownItToken instance.
|
|
251
|
+
* @returns {boolean} True iff token is a math block.
|
|
252
|
+
*/
|
|
253
|
+
function isMathBlock(token) {
|
|
254
|
+
return ((token.tag === "math") &&
|
|
255
|
+
token.type.startsWith("math_block") &&
|
|
256
|
+
!token.type.endsWith("_end"));
|
|
257
|
+
}
|
|
218
258
|
// Get line metadata array
|
|
219
259
|
module.exports.getLineMetadata = function getLineMetadata(params) {
|
|
220
|
-
var lineMetadata = params.lines.map(function
|
|
221
|
-
|
|
222
|
-
});
|
|
223
|
-
filterTokens(params, "fence", function forToken(token) {
|
|
260
|
+
var lineMetadata = params.lines.map(function (line, index) { return [line, index, false, 0, false, false, false, false]; });
|
|
261
|
+
filterTokens(params, "fence", function (token) {
|
|
224
262
|
lineMetadata[token.map[0]][3] = 1;
|
|
225
263
|
lineMetadata[token.map[1] - 1][3] = -1;
|
|
226
264
|
for (var i = token.map[0] + 1; i < token.map[1] - 1; i++) {
|
|
227
265
|
lineMetadata[i][2] = true;
|
|
228
266
|
}
|
|
229
267
|
});
|
|
230
|
-
filterTokens(params, "code_block", function
|
|
268
|
+
filterTokens(params, "code_block", function (token) {
|
|
231
269
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
232
270
|
lineMetadata[i][2] = true;
|
|
233
271
|
}
|
|
234
272
|
});
|
|
235
|
-
filterTokens(params, "table_open", function
|
|
273
|
+
filterTokens(params, "table_open", function (token) {
|
|
236
274
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
237
275
|
lineMetadata[i][4] = true;
|
|
238
276
|
}
|
|
239
277
|
});
|
|
240
|
-
filterTokens(params, "list_item_open", function
|
|
278
|
+
filterTokens(params, "list_item_open", function (token) {
|
|
241
279
|
var count = 1;
|
|
242
280
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
243
281
|
lineMetadata[i][5] = count;
|
|
244
282
|
count++;
|
|
245
283
|
}
|
|
246
284
|
});
|
|
247
|
-
filterTokens(params, "hr", function
|
|
285
|
+
filterTokens(params, "hr", function (token) {
|
|
248
286
|
lineMetadata[token.map[0]][6] = true;
|
|
249
287
|
});
|
|
288
|
+
params.tokens.filter(isMathBlock).forEach(function (token) {
|
|
289
|
+
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
290
|
+
lineMetadata[i][7] = true;
|
|
291
|
+
}
|
|
292
|
+
});
|
|
250
293
|
return lineMetadata;
|
|
251
294
|
};
|
|
252
295
|
// Calls the provided function for each line (with context)
|
|
253
296
|
module.exports.forEachLine = function forEachLine(lineMetadata, handler) {
|
|
254
297
|
lineMetadata.forEach(function forMetadata(metadata) {
|
|
255
|
-
// Parameters:
|
|
298
|
+
// Parameters:
|
|
299
|
+
// line, lineIndex, inCode, onFence, inTable, inItem, inBreak, inMath
|
|
256
300
|
handler.apply(void 0, metadata);
|
|
257
301
|
});
|
|
258
302
|
};
|
|
259
303
|
// Returns (nested) lists as a flat array (in order)
|
|
260
|
-
module.exports.flattenLists = function flattenLists(
|
|
304
|
+
module.exports.flattenLists = function flattenLists(tokens) {
|
|
261
305
|
var flattenedLists = [];
|
|
262
306
|
var stack = [];
|
|
263
307
|
var current = null;
|
|
264
308
|
var nesting = 0;
|
|
265
309
|
var nestingStack = [];
|
|
266
310
|
var lastWithMap = { "map": [0, 1] };
|
|
267
|
-
|
|
311
|
+
tokens.forEach(function (token) {
|
|
312
|
+
if (isMathBlock(token) && token.map[1]) {
|
|
313
|
+
// markdown-it-texmath plugin does not account for math_block_end
|
|
314
|
+
token.map[1]++;
|
|
315
|
+
}
|
|
268
316
|
if ((token.type === "bullet_list_open") ||
|
|
269
317
|
(token.type === "ordered_list_open")) {
|
|
270
318
|
// Save current context and start a new one
|
|
@@ -469,6 +517,36 @@ module.exports.addErrorContext = function addErrorContext(onError, lineNumber, c
|
|
|
469
517
|
}
|
|
470
518
|
addError(onError, lineNumber, null, context, range, fixInfo);
|
|
471
519
|
};
|
|
520
|
+
/**
|
|
521
|
+
* Returns an array of code span ranges.
|
|
522
|
+
*
|
|
523
|
+
* @param {string[]} lines Lines to scan for code span ranges.
|
|
524
|
+
* @returns {number[][]} Array of ranges (line, index, length).
|
|
525
|
+
*/
|
|
526
|
+
module.exports.inlineCodeSpanRanges = function (lines) {
|
|
527
|
+
var exclusions = [];
|
|
528
|
+
forEachInlineCodeSpan(lines.join("\n"), function (code, lineIndex, columnIndex) {
|
|
529
|
+
var codeLines = code.split(newLineRe);
|
|
530
|
+
// eslint-disable-next-line unicorn/no-for-loop
|
|
531
|
+
for (var i = 0; i < codeLines.length; i++) {
|
|
532
|
+
exclusions.push([lineIndex + i, columnIndex, codeLines[i].length]);
|
|
533
|
+
columnIndex = 0;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
return exclusions;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* Determines whether the specified range overlaps another range.
|
|
540
|
+
*
|
|
541
|
+
* @param {number[][]} ranges Array of ranges (line, index, length).
|
|
542
|
+
* @param {number} lineIndex Line index to check.
|
|
543
|
+
* @param {number} index Index to check.
|
|
544
|
+
* @param {number} length Length to check.
|
|
545
|
+
* @returns {boolean} True iff the specified range overlaps.
|
|
546
|
+
*/
|
|
547
|
+
module.exports.overlapsAnyRange = function (ranges, lineIndex, index, length) { return (!ranges.every(function (span) { return ((lineIndex !== span[0]) ||
|
|
548
|
+
(index + length < span[1]) ||
|
|
549
|
+
(index > span[1] + span[2])); })); };
|
|
472
550
|
// Returns a range object for a line by applying a RegExp
|
|
473
551
|
module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
|
474
552
|
var range = null;
|
|
@@ -484,7 +562,7 @@ module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
|
|
484
562
|
module.exports.frontMatterHasTitle =
|
|
485
563
|
function frontMatterHasTitle(frontMatterLines, frontMatterTitlePattern) {
|
|
486
564
|
var ignoreFrontMatter = (frontMatterTitlePattern !== undefined) && !frontMatterTitlePattern;
|
|
487
|
-
var frontMatterTitleRe = new RegExp(String(frontMatterTitlePattern || "^\\s
|
|
565
|
+
var frontMatterTitleRe = new RegExp(String(frontMatterTitlePattern || "^\\s*\"?title\"?\\s*[:=]"), "i");
|
|
488
566
|
return !ignoreFrontMatter &&
|
|
489
567
|
frontMatterLines.some(function (line) { return frontMatterTitleRe.test(line); });
|
|
490
568
|
};
|
|
@@ -656,8 +734,9 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|
|
656
734
|
var lineIndex = lineNumber - 1;
|
|
657
735
|
var editIndex = editColumn - 1;
|
|
658
736
|
if ((lineIndex !== lastLineIndex) ||
|
|
659
|
-
(
|
|
660
|
-
(
|
|
737
|
+
(deleteCount === -1) ||
|
|
738
|
+
((editIndex + deleteCount) <=
|
|
739
|
+
(lastEditIndex - ((deleteCount > 0) ? 0 : 1)))) {
|
|
661
740
|
lines[lineIndex] = applyFix(lines[lineIndex], fixInfo, lineEnding);
|
|
662
741
|
}
|
|
663
742
|
lastLineIndex = lineIndex;
|
|
@@ -667,16 +746,18 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|
|
667
746
|
return lines.filter(function (line) { return line !== null; }).join(lineEnding);
|
|
668
747
|
};
|
|
669
748
|
|
|
670
|
-
|
|
671
|
-
|
|
749
|
+
|
|
750
|
+
/***/ }),
|
|
751
|
+
|
|
752
|
+
/***/ "../lib/cache.js":
|
|
753
|
+
/*!***********************!*\
|
|
754
|
+
!*** ../lib/cache.js ***!
|
|
755
|
+
\***********************/
|
|
756
|
+
/***/ ((module) => {
|
|
757
|
+
|
|
672
758
|
"use strict";
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (value) {
|
|
676
|
-
lineMetadata = value;
|
|
677
|
-
}
|
|
678
|
-
return lineMetadata;
|
|
679
|
-
};
|
|
759
|
+
// @ts-check
|
|
760
|
+
|
|
680
761
|
var flattenedLists = null;
|
|
681
762
|
module.exports.flattenedLists = function (value) {
|
|
682
763
|
if (value) {
|
|
@@ -684,14 +765,38 @@ module.exports.flattenedLists = function (value) {
|
|
|
684
765
|
}
|
|
685
766
|
return flattenedLists;
|
|
686
767
|
};
|
|
768
|
+
var inlineCodeSpanRanges = null;
|
|
769
|
+
module.exports.inlineCodeSpanRanges = function (value) {
|
|
770
|
+
if (value) {
|
|
771
|
+
inlineCodeSpanRanges = value;
|
|
772
|
+
}
|
|
773
|
+
return inlineCodeSpanRanges;
|
|
774
|
+
};
|
|
775
|
+
var lineMetadata = null;
|
|
776
|
+
module.exports.lineMetadata = function (value) {
|
|
777
|
+
if (value) {
|
|
778
|
+
lineMetadata = value;
|
|
779
|
+
}
|
|
780
|
+
return lineMetadata;
|
|
781
|
+
};
|
|
687
782
|
module.exports.clear = function () {
|
|
688
|
-
lineMetadata = null;
|
|
689
783
|
flattenedLists = null;
|
|
784
|
+
inlineCodeSpanRanges = null;
|
|
785
|
+
lineMetadata = null;
|
|
690
786
|
};
|
|
691
787
|
|
|
692
|
-
|
|
693
|
-
|
|
788
|
+
|
|
789
|
+
/***/ }),
|
|
790
|
+
|
|
791
|
+
/***/ "../lib/markdownlint.js":
|
|
792
|
+
/*!******************************!*\
|
|
793
|
+
!*** ../lib/markdownlint.js ***!
|
|
794
|
+
\******************************/
|
|
795
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
796
|
+
|
|
694
797
|
"use strict";
|
|
798
|
+
// @ts-check
|
|
799
|
+
|
|
695
800
|
var __assign = (this && this.__assign) || function () {
|
|
696
801
|
__assign = Object.assign || function(t) {
|
|
697
802
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -703,20 +808,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
703
808
|
};
|
|
704
809
|
return __assign.apply(this, arguments);
|
|
705
810
|
};
|
|
706
|
-
var
|
|
707
|
-
for (var
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
r[k] = a[j];
|
|
711
|
-
return r;
|
|
811
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
812
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
813
|
+
to[j] = from[i];
|
|
814
|
+
return to;
|
|
712
815
|
};
|
|
713
|
-
var
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
var
|
|
717
|
-
var
|
|
718
|
-
var
|
|
719
|
-
|
|
816
|
+
var path = __webpack_require__(/*! path */ "?b85c");
|
|
817
|
+
var promisify = __webpack_require__(/*! util */ "?96a2").promisify;
|
|
818
|
+
var markdownIt = __webpack_require__(/*! markdown-it */ "markdown-it");
|
|
819
|
+
var rules = __webpack_require__(/*! ./rules */ "../lib/rules.js");
|
|
820
|
+
var helpers = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
|
821
|
+
var cache = __webpack_require__(/*! ./cache */ "../lib/cache.js");
|
|
822
|
+
// @ts-ignore
|
|
823
|
+
// eslint-disable-next-line camelcase, max-len, no-inline-comments, no-undef
|
|
824
|
+
var dynamicRequire = (typeof require === "undefined") ? __webpack_require__("../lib sync recursive") : /* c8 ignore next */ require;
|
|
825
|
+
// Capture native require implementation for dynamic loading of modules
|
|
720
826
|
var deprecatedRuleNames = ["MD002", "MD006"];
|
|
721
827
|
/**
|
|
722
828
|
* Validate the list of rules for structure and reuse.
|
|
@@ -756,10 +862,10 @@ function validateRuleList(ruleList) {
|
|
|
756
862
|
result = newError(property);
|
|
757
863
|
}
|
|
758
864
|
});
|
|
759
|
-
if (!result &&
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
865
|
+
if (!result &&
|
|
866
|
+
rule.information &&
|
|
867
|
+
(Object.getPrototypeOf(rule.information) !== URL.prototype)) {
|
|
868
|
+
result = newError("information");
|
|
763
869
|
}
|
|
764
870
|
if (!result) {
|
|
765
871
|
rule.names.forEach(function forName(name) {
|
|
@@ -877,20 +983,23 @@ function removeFrontMatter(content, frontMatter) {
|
|
|
877
983
|
* @returns {void}
|
|
878
984
|
*/
|
|
879
985
|
function annotateTokens(tokens, lines) {
|
|
880
|
-
var
|
|
986
|
+
var tableMap = null;
|
|
881
987
|
tokens.forEach(function forToken(token) {
|
|
882
|
-
// Handle missing maps for table body
|
|
883
|
-
if (token.type === "
|
|
884
|
-
|
|
988
|
+
// Handle missing maps for table head/body
|
|
989
|
+
if ((token.type === "thead_open") ||
|
|
990
|
+
(token.type === "tbody_open")) {
|
|
991
|
+
tableMap = __spreadArray([], token.map);
|
|
885
992
|
}
|
|
886
|
-
else if ((token.type === "tr_close") &&
|
|
887
|
-
|
|
993
|
+
else if ((token.type === "tr_close") &&
|
|
994
|
+
tableMap) {
|
|
995
|
+
tableMap[0]++;
|
|
888
996
|
}
|
|
889
|
-
else if (token.type === "
|
|
890
|
-
|
|
997
|
+
else if ((token.type === "thead_close") ||
|
|
998
|
+
(token.type === "tbody_close")) {
|
|
999
|
+
tableMap = null;
|
|
891
1000
|
}
|
|
892
|
-
if (
|
|
893
|
-
token.map =
|
|
1001
|
+
if (tableMap && !token.map) {
|
|
1002
|
+
token.map = __spreadArray([], tableMap);
|
|
894
1003
|
}
|
|
895
1004
|
// Update token metadata
|
|
896
1005
|
if (token.map) {
|
|
@@ -1013,13 +1122,13 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1013
1122
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1014
1123
|
function handleInlineConfig(perLine, forEachMatch, forEachLine) {
|
|
1015
1124
|
var input = perLine ? lines : [lines.join("\n")];
|
|
1016
|
-
input.forEach(function (line) {
|
|
1125
|
+
input.forEach(function (line, lineIndex) {
|
|
1017
1126
|
if (!noInlineConfig) {
|
|
1018
1127
|
var match = null;
|
|
1019
1128
|
while ((match = helpers.inlineCommentRe.exec(line))) {
|
|
1020
1129
|
var action = (match[1] || match[3]).toUpperCase();
|
|
1021
1130
|
var parameter = match[2] || match[4];
|
|
1022
|
-
forEachMatch(action, parameter);
|
|
1131
|
+
forEachMatch(action, parameter, lineIndex + 1);
|
|
1023
1132
|
}
|
|
1024
1133
|
}
|
|
1025
1134
|
if (forEachLine) {
|
|
@@ -1040,21 +1149,21 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1040
1149
|
}
|
|
1041
1150
|
}
|
|
1042
1151
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1043
|
-
function applyEnableDisable(action, parameter) {
|
|
1152
|
+
function applyEnableDisable(action, parameter, state) {
|
|
1044
1153
|
var enabled = (action.startsWith("ENABLE"));
|
|
1045
1154
|
var items = parameter ?
|
|
1046
1155
|
parameter.trim().toUpperCase().split(/\s+/) :
|
|
1047
1156
|
allRuleNames;
|
|
1048
1157
|
items.forEach(function (nameUpper) {
|
|
1049
1158
|
(aliasToRuleNames[nameUpper] || []).forEach(function (ruleName) {
|
|
1050
|
-
|
|
1159
|
+
state[ruleName] = enabled;
|
|
1051
1160
|
});
|
|
1052
1161
|
});
|
|
1053
1162
|
}
|
|
1054
1163
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1055
1164
|
function enableDisableFile(action, parameter) {
|
|
1056
1165
|
if ((action === "ENABLE-FILE") || (action === "DISABLE-FILE")) {
|
|
1057
|
-
applyEnableDisable(action, parameter);
|
|
1166
|
+
applyEnableDisable(action, parameter, enabledRules);
|
|
1058
1167
|
}
|
|
1059
1168
|
}
|
|
1060
1169
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -1067,12 +1176,18 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1067
1176
|
}
|
|
1068
1177
|
else if ((action === "ENABLE") || (action === "DISABLE")) {
|
|
1069
1178
|
enabledRules = __assign({}, enabledRules);
|
|
1070
|
-
applyEnableDisable(action, parameter);
|
|
1179
|
+
applyEnableDisable(action, parameter, enabledRules);
|
|
1071
1180
|
}
|
|
1072
1181
|
}
|
|
1073
1182
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1074
1183
|
function updateLineState() {
|
|
1075
|
-
enabledRulesPerLineNumber.push(enabledRules);
|
|
1184
|
+
enabledRulesPerLineNumber.push(__assign({}, enabledRules));
|
|
1185
|
+
}
|
|
1186
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1187
|
+
function disableNextLine(action, parameter, lineNumber) {
|
|
1188
|
+
if (action === "DISABLE-NEXT-LINE") {
|
|
1189
|
+
applyEnableDisable(action, parameter, enabledRulesPerLineNumber[lineNumber + 1] || {});
|
|
1190
|
+
}
|
|
1076
1191
|
}
|
|
1077
1192
|
// Handle inline comments
|
|
1078
1193
|
handleInlineConfig(false, configureFile);
|
|
@@ -1085,6 +1200,7 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1085
1200
|
capturedRules = enabledRules;
|
|
1086
1201
|
handleInlineConfig(true, enableDisableFile);
|
|
1087
1202
|
handleInlineConfig(true, captureRestoreEnableDisable, updateLineState);
|
|
1203
|
+
handleInlineConfig(true, disableNextLine);
|
|
1088
1204
|
// Return results
|
|
1089
1205
|
return {
|
|
1090
1206
|
effectiveConfig: effectiveConfig,
|
|
@@ -1125,8 +1241,8 @@ function uniqueFilterForSortedErrors(value, index, array) {
|
|
|
1125
1241
|
*
|
|
1126
1242
|
* @param {Rule[]} ruleList List of rules.
|
|
1127
1243
|
* @param {string} name Identifier for the content.
|
|
1128
|
-
* @param {string} content Markdown content
|
|
1129
|
-
* @param {Object} md markdown-it
|
|
1244
|
+
* @param {string} content Markdown content.
|
|
1245
|
+
* @param {Object} md Instance of markdown-it.
|
|
1130
1246
|
* @param {Configuration} config Configuration object.
|
|
1131
1247
|
* @param {RegExp} frontMatter Regular expression for front matter.
|
|
1132
1248
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
|
@@ -1157,7 +1273,8 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|
|
1157
1273
|
frontMatterLines: frontMatterLines
|
|
1158
1274
|
};
|
|
1159
1275
|
cache.lineMetadata(helpers.getLineMetadata(params));
|
|
1160
|
-
cache.flattenedLists(helpers.flattenLists(params));
|
|
1276
|
+
cache.flattenedLists(helpers.flattenLists(params.tokens));
|
|
1277
|
+
cache.inlineCodeSpanRanges(helpers.inlineCodeSpanRanges(params.lines));
|
|
1161
1278
|
// Function to run for each rule
|
|
1162
1279
|
var result = (resultVersion === 0) ? {} : [];
|
|
1163
1280
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -1243,7 +1360,7 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|
|
1243
1360
|
"lineNumber": errorInfo.lineNumber + frontMatterLines.length,
|
|
1244
1361
|
"detail": errorInfo.detail || null,
|
|
1245
1362
|
"context": errorInfo.context || null,
|
|
1246
|
-
"range": errorInfo.range ?
|
|
1363
|
+
"range": errorInfo.range ? __spreadArray([], errorInfo.range) : null,
|
|
1247
1364
|
"fixInfo": fixInfo ? cleanFixInfo : null
|
|
1248
1365
|
});
|
|
1249
1366
|
}
|
|
@@ -1322,17 +1439,18 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|
|
1322
1439
|
*
|
|
1323
1440
|
* @param {Rule[]} ruleList List of rules.
|
|
1324
1441
|
* @param {string} file Path of file to lint.
|
|
1325
|
-
* @param {Object} md markdown-it
|
|
1442
|
+
* @param {Object} md Instance of markdown-it.
|
|
1326
1443
|
* @param {Configuration} config Configuration object.
|
|
1327
1444
|
* @param {RegExp} frontMatter Regular expression for front matter.
|
|
1328
1445
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
|
1329
1446
|
* @param {boolean} noInlineConfig Whether to allow inline configuration.
|
|
1330
1447
|
* @param {number} resultVersion Version of the LintResults object to return.
|
|
1448
|
+
* @param {Object} fs File system implementation.
|
|
1331
1449
|
* @param {boolean} synchronous Whether to execute synchronously.
|
|
1332
1450
|
* @param {Function} callback Callback (err, result) function.
|
|
1333
1451
|
* @returns {void}
|
|
1334
1452
|
*/
|
|
1335
|
-
function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, callback) {
|
|
1453
|
+
function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, callback) {
|
|
1336
1454
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1337
1455
|
function lintContentWrapper(err, content) {
|
|
1338
1456
|
if (err) {
|
|
@@ -1342,11 +1460,10 @@ function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, n
|
|
|
1342
1460
|
}
|
|
1343
1461
|
// Make a/synchronous call to read file
|
|
1344
1462
|
if (synchronous) {
|
|
1345
|
-
|
|
1346
|
-
lintContentWrapper(null, fs.readFileSync(file, helpers.utf8Encoding));
|
|
1463
|
+
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
|
1347
1464
|
}
|
|
1348
1465
|
else {
|
|
1349
|
-
fs.readFile(file,
|
|
1466
|
+
fs.readFile(file, "utf8", lintContentWrapper);
|
|
1350
1467
|
}
|
|
1351
1468
|
}
|
|
1352
1469
|
/**
|
|
@@ -1361,6 +1478,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1361
1478
|
// Normalize inputs
|
|
1362
1479
|
options = options || {};
|
|
1363
1480
|
callback = callback || function noop() { };
|
|
1481
|
+
// eslint-disable-next-line unicorn/prefer-spread
|
|
1364
1482
|
var ruleList = rules.concat(options.customRules || []);
|
|
1365
1483
|
var ruleErr = validateRuleList(ruleList);
|
|
1366
1484
|
if (ruleErr) {
|
|
@@ -1368,7 +1486,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1368
1486
|
}
|
|
1369
1487
|
var files = [];
|
|
1370
1488
|
if (Array.isArray(options.files)) {
|
|
1371
|
-
files = options.files
|
|
1489
|
+
files = __spreadArray([], options.files);
|
|
1372
1490
|
}
|
|
1373
1491
|
else if (options.files) {
|
|
1374
1492
|
files = [String(options.files)];
|
|
@@ -1388,6 +1506,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1388
1506
|
// @ts-ignore
|
|
1389
1507
|
md.use.apply(md, plugin);
|
|
1390
1508
|
});
|
|
1509
|
+
var fs = options.fs || __webpack_require__(/*! fs */ "?ec0a");
|
|
1391
1510
|
var results = newResults(ruleList);
|
|
1392
1511
|
var done = false;
|
|
1393
1512
|
// Linting of strings is always synchronous
|
|
@@ -1407,7 +1526,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1407
1526
|
if (synchronous) {
|
|
1408
1527
|
// Lint files synchronously
|
|
1409
1528
|
while (!done && (syncItem = files.shift())) {
|
|
1410
|
-
lintFile(ruleList, syncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, syncCallback);
|
|
1529
|
+
lintFile(ruleList, syncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, syncCallback);
|
|
1411
1530
|
}
|
|
1412
1531
|
return done || callback(null, results);
|
|
1413
1532
|
}
|
|
@@ -1421,7 +1540,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1421
1540
|
}
|
|
1422
1541
|
else if (asyncItem) {
|
|
1423
1542
|
concurrency++;
|
|
1424
|
-
lintFile(ruleList, asyncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, function (err, result) {
|
|
1543
|
+
lintFile(ruleList, asyncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, function (err, result) {
|
|
1425
1544
|
concurrency--;
|
|
1426
1545
|
if (err) {
|
|
1427
1546
|
done = true;
|
|
@@ -1461,7 +1580,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1461
1580
|
function markdownlint(options, callback) {
|
|
1462
1581
|
return lintInput(options, false, callback);
|
|
1463
1582
|
}
|
|
1464
|
-
var markdownlintPromisify =
|
|
1583
|
+
var markdownlintPromisify = promisify && promisify(markdownlint);
|
|
1465
1584
|
/**
|
|
1466
1585
|
* Lint specified Markdown files.
|
|
1467
1586
|
*
|
|
@@ -1519,23 +1638,87 @@ function parseConfiguration(name, content, parsers) {
|
|
|
1519
1638
|
message: message
|
|
1520
1639
|
};
|
|
1521
1640
|
}
|
|
1641
|
+
/**
|
|
1642
|
+
* Resolve referenced "extends" path in a configuration file
|
|
1643
|
+
* using path.resolve() with require.resolve() as a fallback.
|
|
1644
|
+
*
|
|
1645
|
+
* @param {string} configFile Configuration file name.
|
|
1646
|
+
* @param {string} referenceId Referenced identifier to resolve.
|
|
1647
|
+
* @param {Object} fs File system implementation.
|
|
1648
|
+
* @param {ResolveConfigExtendsCallback} [callback] Callback (err, result)
|
|
1649
|
+
* function.
|
|
1650
|
+
* @returns {void}
|
|
1651
|
+
*/
|
|
1652
|
+
function resolveConfigExtends(configFile, referenceId, fs, callback) {
|
|
1653
|
+
var configFileDirname = path.dirname(configFile);
|
|
1654
|
+
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
|
1655
|
+
fs.access(resolvedExtendsFile, function (err) {
|
|
1656
|
+
if (err) {
|
|
1657
|
+
// Not a file, try require.resolve
|
|
1658
|
+
try {
|
|
1659
|
+
return callback(null, dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] }));
|
|
1660
|
+
}
|
|
1661
|
+
catch (_a) {
|
|
1662
|
+
// Unable to resolve, use resolvedExtendsFile
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
return callback(null, resolvedExtendsFile);
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* Resolve referenced "extends" path in a configuration file
|
|
1670
|
+
* using path.resolve() with require.resolve() as a fallback.
|
|
1671
|
+
*
|
|
1672
|
+
* @param {string} configFile Configuration file name.
|
|
1673
|
+
* @param {string} referenceId Referenced identifier to resolve.
|
|
1674
|
+
* @param {Object} fs File system implementation.
|
|
1675
|
+
* @returns {string} Resolved path to file.
|
|
1676
|
+
*/
|
|
1677
|
+
function resolveConfigExtendsSync(configFile, referenceId, fs) {
|
|
1678
|
+
var configFileDirname = path.dirname(configFile);
|
|
1679
|
+
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
|
1680
|
+
try {
|
|
1681
|
+
fs.accessSync(resolvedExtendsFile);
|
|
1682
|
+
return resolvedExtendsFile;
|
|
1683
|
+
}
|
|
1684
|
+
catch (_a) {
|
|
1685
|
+
// Not a file, try require.resolve
|
|
1686
|
+
}
|
|
1687
|
+
try {
|
|
1688
|
+
return dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] });
|
|
1689
|
+
}
|
|
1690
|
+
catch (_b) {
|
|
1691
|
+
// Unable to resolve, return resolvedExtendsFile
|
|
1692
|
+
}
|
|
1693
|
+
return resolvedExtendsFile;
|
|
1694
|
+
}
|
|
1522
1695
|
/**
|
|
1523
1696
|
* Read specified configuration file.
|
|
1524
1697
|
*
|
|
1525
1698
|
* @param {string} file Configuration file name.
|
|
1526
1699
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
|
1527
1700
|
* function(s).
|
|
1701
|
+
* @param {Object} [fs] File system implementation.
|
|
1528
1702
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
|
1529
1703
|
* @returns {void}
|
|
1530
1704
|
*/
|
|
1531
|
-
function readConfig(file, parsers, callback) {
|
|
1705
|
+
function readConfig(file, parsers, fs, callback) {
|
|
1532
1706
|
if (!callback) {
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1707
|
+
if (fs) {
|
|
1708
|
+
callback = fs;
|
|
1709
|
+
fs = null;
|
|
1710
|
+
}
|
|
1711
|
+
else {
|
|
1712
|
+
// @ts-ignore
|
|
1713
|
+
callback = parsers;
|
|
1714
|
+
parsers = null;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
if (!fs) {
|
|
1718
|
+
fs = __webpack_require__(/*! fs */ "?ec0a");
|
|
1536
1719
|
}
|
|
1537
1720
|
// Read file
|
|
1538
|
-
fs.readFile(file,
|
|
1721
|
+
fs.readFile(file, "utf8", function (err, content) {
|
|
1539
1722
|
if (err) {
|
|
1540
1723
|
return callback(err);
|
|
1541
1724
|
}
|
|
@@ -1549,40 +1732,44 @@ function readConfig(file, parsers, callback) {
|
|
|
1549
1732
|
var configExtends = config["extends"];
|
|
1550
1733
|
if (configExtends) {
|
|
1551
1734
|
delete config["extends"];
|
|
1552
|
-
|
|
1553
|
-
return readConfig(extendsFile, parsers, function (errr, extendsConfig) {
|
|
1735
|
+
return resolveConfigExtends(file, configExtends, fs, function (_, resolvedExtends) { return readConfig(resolvedExtends, parsers, fs, function (errr, extendsConfig) {
|
|
1554
1736
|
if (errr) {
|
|
1555
1737
|
return callback(errr);
|
|
1556
1738
|
}
|
|
1557
1739
|
return callback(null, __assign(__assign({}, extendsConfig), config));
|
|
1558
|
-
});
|
|
1740
|
+
}); });
|
|
1559
1741
|
}
|
|
1560
1742
|
return callback(null, config);
|
|
1561
1743
|
});
|
|
1562
1744
|
}
|
|
1563
|
-
var readConfigPromisify =
|
|
1745
|
+
var readConfigPromisify = promisify && promisify(readConfig);
|
|
1564
1746
|
/**
|
|
1565
1747
|
* Read specified configuration file.
|
|
1566
1748
|
*
|
|
1567
1749
|
* @param {string} file Configuration file name.
|
|
1568
1750
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
|
1751
|
+
* @param {Object} [fs] File system implementation.
|
|
1569
1752
|
* @returns {Promise<Configuration>} Configuration object.
|
|
1570
1753
|
*/
|
|
1571
|
-
function readConfigPromise(file, parsers) {
|
|
1754
|
+
function readConfigPromise(file, parsers, fs) {
|
|
1572
1755
|
// @ts-ignore
|
|
1573
|
-
return readConfigPromisify(file, parsers);
|
|
1756
|
+
return readConfigPromisify(file, parsers, fs);
|
|
1574
1757
|
}
|
|
1575
1758
|
/**
|
|
1576
1759
|
* Read specified configuration file synchronously.
|
|
1577
1760
|
*
|
|
1578
1761
|
* @param {string} file Configuration file name.
|
|
1579
1762
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
|
1763
|
+
* @param {Object} [fs] File system implementation.
|
|
1580
1764
|
* @returns {Configuration} Configuration object.
|
|
1765
|
+
* @throws An Error if processing fails.
|
|
1581
1766
|
*/
|
|
1582
|
-
function readConfigSync(file, parsers) {
|
|
1767
|
+
function readConfigSync(file, parsers, fs) {
|
|
1768
|
+
if (!fs) {
|
|
1769
|
+
fs = __webpack_require__(/*! fs */ "?ec0a");
|
|
1770
|
+
}
|
|
1583
1771
|
// Read file
|
|
1584
|
-
|
|
1585
|
-
var content = fs.readFileSync(file, helpers.utf8Encoding);
|
|
1772
|
+
var content = fs.readFileSync(file, "utf8");
|
|
1586
1773
|
// Try to parse file
|
|
1587
1774
|
var _a = parseConfiguration(file, content, parsers), config = _a.config, message = _a.message;
|
|
1588
1775
|
if (!config) {
|
|
@@ -1592,7 +1779,8 @@ function readConfigSync(file, parsers) {
|
|
|
1592
1779
|
var configExtends = config["extends"];
|
|
1593
1780
|
if (configExtends) {
|
|
1594
1781
|
delete config["extends"];
|
|
1595
|
-
|
|
1782
|
+
var resolvedExtends = resolveConfigExtendsSync(file, configExtends, fs);
|
|
1783
|
+
return __assign(__assign({}, readConfigSync(resolvedExtends, parsers, fs)), config);
|
|
1596
1784
|
}
|
|
1597
1785
|
return config;
|
|
1598
1786
|
}
|
|
@@ -1602,7 +1790,7 @@ function readConfigSync(file, parsers) {
|
|
|
1602
1790
|
* @returns {string} SemVer string.
|
|
1603
1791
|
*/
|
|
1604
1792
|
function getVersion() {
|
|
1605
|
-
return
|
|
1793
|
+
return __webpack_require__(/*! ../package.json */ "../package.json").version;
|
|
1606
1794
|
}
|
|
1607
1795
|
// Export a/synchronous/Promise APIs
|
|
1608
1796
|
markdownlint.sync = markdownlintSync;
|
|
@@ -1615,10 +1803,19 @@ markdownlint.promises = {
|
|
|
1615
1803
|
};
|
|
1616
1804
|
module.exports = markdownlint;
|
|
1617
1805
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1806
|
+
|
|
1807
|
+
/***/ }),
|
|
1808
|
+
|
|
1809
|
+
/***/ "../lib/md001.js":
|
|
1810
|
+
/*!***********************!*\
|
|
1811
|
+
!*** ../lib/md001.js ***!
|
|
1812
|
+
\***********************/
|
|
1813
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1814
|
+
|
|
1620
1815
|
"use strict";
|
|
1621
|
-
|
|
1816
|
+
// @ts-check
|
|
1817
|
+
|
|
1818
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens;
|
|
1622
1819
|
module.exports = {
|
|
1623
1820
|
"names": ["MD001", "heading-increment", "header-increment"],
|
|
1624
1821
|
"description": "Heading levels should only increment by one level at a time",
|
|
@@ -1635,13 +1832,22 @@ module.exports = {
|
|
|
1635
1832
|
}
|
|
1636
1833
|
};
|
|
1637
1834
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1835
|
+
|
|
1836
|
+
/***/ }),
|
|
1837
|
+
|
|
1838
|
+
/***/ "../lib/md002.js":
|
|
1839
|
+
/*!***********************!*\
|
|
1840
|
+
!*** ../lib/md002.js ***!
|
|
1841
|
+
\***********************/
|
|
1842
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1843
|
+
|
|
1640
1844
|
"use strict";
|
|
1641
|
-
|
|
1845
|
+
// @ts-check
|
|
1846
|
+
|
|
1847
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
1642
1848
|
module.exports = {
|
|
1643
1849
|
"names": ["MD002", "first-heading-h1", "first-header-h1"],
|
|
1644
|
-
"description": "First heading should be a top
|
|
1850
|
+
"description": "First heading should be a top-level heading",
|
|
1645
1851
|
"tags": ["headings", "headers"],
|
|
1646
1852
|
"function": function MD002(params, onError) {
|
|
1647
1853
|
var level = Number(params.config.level || 1);
|
|
@@ -1656,10 +1862,19 @@ module.exports = {
|
|
|
1656
1862
|
}
|
|
1657
1863
|
};
|
|
1658
1864
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1865
|
+
|
|
1866
|
+
/***/ }),
|
|
1867
|
+
|
|
1868
|
+
/***/ "../lib/md003.js":
|
|
1869
|
+
/*!***********************!*\
|
|
1870
|
+
!*** ../lib/md003.js ***!
|
|
1871
|
+
\***********************/
|
|
1872
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1873
|
+
|
|
1661
1874
|
"use strict";
|
|
1662
|
-
|
|
1875
|
+
// @ts-check
|
|
1876
|
+
|
|
1877
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
1663
1878
|
module.exports = {
|
|
1664
1879
|
"names": ["MD003", "heading-style", "header-style"],
|
|
1665
1880
|
"description": "Heading style",
|
|
@@ -1694,11 +1909,31 @@ module.exports = {
|
|
|
1694
1909
|
}
|
|
1695
1910
|
};
|
|
1696
1911
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1912
|
+
|
|
1913
|
+
/***/ }),
|
|
1914
|
+
|
|
1915
|
+
/***/ "../lib/md004.js":
|
|
1916
|
+
/*!***********************!*\
|
|
1917
|
+
!*** ../lib/md004.js ***!
|
|
1918
|
+
\***********************/
|
|
1919
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1920
|
+
|
|
1699
1921
|
"use strict";
|
|
1700
|
-
|
|
1701
|
-
|
|
1922
|
+
// @ts-check
|
|
1923
|
+
|
|
1924
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, unorderedListStyleFor = _a.unorderedListStyleFor;
|
|
1925
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1926
|
+
var expectedStyleToMarker = {
|
|
1927
|
+
"dash": "-",
|
|
1928
|
+
"plus": "+",
|
|
1929
|
+
"asterisk": "*"
|
|
1930
|
+
};
|
|
1931
|
+
var differentItemStyle = {
|
|
1932
|
+
"dash": "plus",
|
|
1933
|
+
"plus": "asterisk",
|
|
1934
|
+
"asterisk": "dash"
|
|
1935
|
+
};
|
|
1936
|
+
var validStyles = Object.keys(expectedStyleToMarker);
|
|
1702
1937
|
module.exports = {
|
|
1703
1938
|
"names": ["MD004", "ul-style"],
|
|
1704
1939
|
"description": "Unordered list style",
|
|
@@ -1716,28 +1951,51 @@ module.exports = {
|
|
|
1716
1951
|
var itemStyle = unorderedListStyleFor(item);
|
|
1717
1952
|
if (style === "sublist") {
|
|
1718
1953
|
var nesting = list.nesting;
|
|
1719
|
-
if (!nestingStyles[nesting]
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
addErrorDetailIf(onError, item.lineNumber, nestingStyles[nesting], itemStyle, null, null, rangeFromRegExp(item.line, listItemMarkerRe));
|
|
1954
|
+
if (!nestingStyles[nesting]) {
|
|
1955
|
+
nestingStyles[nesting] =
|
|
1956
|
+
(itemStyle === nestingStyles[nesting - 1]) ?
|
|
1957
|
+
differentItemStyle[itemStyle] :
|
|
1958
|
+
itemStyle;
|
|
1725
1959
|
}
|
|
1960
|
+
expectedStyle = nestingStyles[nesting];
|
|
1726
1961
|
}
|
|
1727
|
-
|
|
1728
|
-
|
|
1962
|
+
if (!validStyles.includes(expectedStyle)) {
|
|
1963
|
+
expectedStyle = validStyles[0];
|
|
1729
1964
|
}
|
|
1965
|
+
var range = null;
|
|
1966
|
+
var fixInfo = null;
|
|
1967
|
+
var match = item.line.match(listItemMarkerRe);
|
|
1968
|
+
if (match) {
|
|
1969
|
+
var column = match.index + 1;
|
|
1970
|
+
var length_1 = match[0].length;
|
|
1971
|
+
range = [column, length_1];
|
|
1972
|
+
fixInfo = {
|
|
1973
|
+
"editColumn": match[1].length + 1,
|
|
1974
|
+
"deleteCount": 1,
|
|
1975
|
+
"insertText": expectedStyleToMarker[expectedStyle]
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
addErrorDetailIf(onError, item.lineNumber, expectedStyle, itemStyle, null, null, range, fixInfo);
|
|
1730
1979
|
});
|
|
1731
1980
|
}
|
|
1732
1981
|
});
|
|
1733
1982
|
}
|
|
1734
1983
|
};
|
|
1735
1984
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1985
|
+
|
|
1986
|
+
/***/ }),
|
|
1987
|
+
|
|
1988
|
+
/***/ "../lib/md005.js":
|
|
1989
|
+
/*!***********************!*\
|
|
1990
|
+
!*** ../lib/md005.js ***!
|
|
1991
|
+
\***********************/
|
|
1992
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1993
|
+
|
|
1738
1994
|
"use strict";
|
|
1739
|
-
|
|
1740
|
-
|
|
1995
|
+
// @ts-check
|
|
1996
|
+
|
|
1997
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, addErrorDetailIf = _a.addErrorDetailIf, indentFor = _a.indentFor, listItemMarkerRe = _a.listItemMarkerRe, orderedListItemMarkerRe = _a.orderedListItemMarkerRe, rangeFromRegExp = _a.rangeFromRegExp;
|
|
1998
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1741
1999
|
module.exports = {
|
|
1742
2000
|
"names": ["MD005", "list-indent"],
|
|
1743
2001
|
"description": "Inconsistent indentation for list items at the same level",
|
|
@@ -1788,11 +2046,20 @@ module.exports = {
|
|
|
1788
2046
|
}
|
|
1789
2047
|
};
|
|
1790
2048
|
|
|
1791
|
-
|
|
1792
|
-
|
|
2049
|
+
|
|
2050
|
+
/***/ }),
|
|
2051
|
+
|
|
2052
|
+
/***/ "../lib/md006.js":
|
|
2053
|
+
/*!***********************!*\
|
|
2054
|
+
!*** ../lib/md006.js ***!
|
|
2055
|
+
\***********************/
|
|
2056
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2057
|
+
|
|
1793
2058
|
"use strict";
|
|
1794
|
-
|
|
1795
|
-
|
|
2059
|
+
// @ts-check
|
|
2060
|
+
|
|
2061
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, rangeFromRegExp = _a.rangeFromRegExp;
|
|
2062
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1796
2063
|
module.exports = {
|
|
1797
2064
|
"names": ["MD006", "ul-start-left"],
|
|
1798
2065
|
"description": "Consider starting bulleted lists at the beginning of the line",
|
|
@@ -1803,7 +2070,7 @@ module.exports = {
|
|
|
1803
2070
|
list.items.forEach(function (item) {
|
|
1804
2071
|
var lineNumber = item.lineNumber, line = item.line;
|
|
1805
2072
|
addErrorDetailIf(onError, lineNumber, 0, list.indent, null, null, rangeFromRegExp(line, listItemMarkerRe), {
|
|
1806
|
-
"deleteCount": line.length - line.
|
|
2073
|
+
"deleteCount": line.length - line.trimStart().length
|
|
1807
2074
|
});
|
|
1808
2075
|
});
|
|
1809
2076
|
}
|
|
@@ -1811,11 +2078,20 @@ module.exports = {
|
|
|
1811
2078
|
}
|
|
1812
2079
|
};
|
|
1813
2080
|
|
|
1814
|
-
|
|
1815
|
-
|
|
2081
|
+
|
|
2082
|
+
/***/ }),
|
|
2083
|
+
|
|
2084
|
+
/***/ "../lib/md007.js":
|
|
2085
|
+
/*!***********************!*\
|
|
2086
|
+
!*** ../lib/md007.js ***!
|
|
2087
|
+
\***********************/
|
|
2088
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2089
|
+
|
|
1816
2090
|
"use strict";
|
|
1817
|
-
|
|
1818
|
-
|
|
2091
|
+
// @ts-check
|
|
2092
|
+
|
|
2093
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, indentFor = _a.indentFor, listItemMarkerRe = _a.listItemMarkerRe;
|
|
2094
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1819
2095
|
module.exports = {
|
|
1820
2096
|
"names": ["MD007", "ul-indent"],
|
|
1821
2097
|
"description": "Unordered list indentation",
|
|
@@ -1848,11 +2124,20 @@ module.exports = {
|
|
|
1848
2124
|
}
|
|
1849
2125
|
};
|
|
1850
2126
|
|
|
1851
|
-
|
|
1852
|
-
|
|
2127
|
+
|
|
2128
|
+
/***/ }),
|
|
2129
|
+
|
|
2130
|
+
/***/ "../lib/md009.js":
|
|
2131
|
+
/*!***********************!*\
|
|
2132
|
+
!*** ../lib/md009.js ***!
|
|
2133
|
+
\***********************/
|
|
2134
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2135
|
+
|
|
1853
2136
|
"use strict";
|
|
1854
|
-
|
|
1855
|
-
|
|
2137
|
+
// @ts-check
|
|
2138
|
+
|
|
2139
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, filterTokens = _a.filterTokens, forEachInlineCodeSpan = _a.forEachInlineCodeSpan, forEachLine = _a.forEachLine, includesSorted = _a.includesSorted, newLineRe = _a.newLineRe, numericSortAscending = _a.numericSortAscending;
|
|
2140
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1856
2141
|
module.exports = {
|
|
1857
2142
|
"names": ["MD009", "no-trailing-spaces"],
|
|
1858
2143
|
"description": "Trailing spaces",
|
|
@@ -1894,34 +2179,41 @@ module.exports = {
|
|
|
1894
2179
|
codeInlineLineNumbers.sort(numericSortAscending);
|
|
1895
2180
|
}
|
|
1896
2181
|
var expected = (brSpaces < 2) ? 0 : brSpaces;
|
|
1897
|
-
|
|
1898
|
-
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
|
1899
|
-
inFencedCode += onFence;
|
|
2182
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
1900
2183
|
var lineNumber = lineIndex + 1;
|
|
1901
|
-
var trailingSpaces = line.length - line.
|
|
1902
|
-
if (
|
|
1903
|
-
!
|
|
1904
|
-
|
|
2184
|
+
var trailingSpaces = line.length - line.trimEnd().length;
|
|
2185
|
+
if (trailingSpaces &&
|
|
2186
|
+
!inCode &&
|
|
2187
|
+
!includesSorted(listItemLineNumbers, lineNumber) &&
|
|
2188
|
+
((expected !== trailingSpaces) ||
|
|
1905
2189
|
(strict &&
|
|
1906
2190
|
(!includesSorted(paragraphLineNumbers, lineNumber) ||
|
|
1907
|
-
includesSorted(codeInlineLineNumbers, lineNumber)))) {
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
}
|
|
2191
|
+
includesSorted(codeInlineLineNumbers, lineNumber))))) {
|
|
2192
|
+
var column = line.length - trailingSpaces + 1;
|
|
2193
|
+
addError(onError, lineNumber, "Expected: " + (expected === 0 ? "" : "0 or ") +
|
|
2194
|
+
expected + "; Actual: " + trailingSpaces, null, [column, trailingSpaces], {
|
|
2195
|
+
"editColumn": column,
|
|
2196
|
+
"deleteCount": trailingSpaces
|
|
2197
|
+
});
|
|
1915
2198
|
}
|
|
1916
2199
|
});
|
|
1917
2200
|
}
|
|
1918
2201
|
};
|
|
1919
2202
|
|
|
1920
|
-
|
|
1921
|
-
|
|
2203
|
+
|
|
2204
|
+
/***/ }),
|
|
2205
|
+
|
|
2206
|
+
/***/ "../lib/md010.js":
|
|
2207
|
+
/*!***********************!*\
|
|
2208
|
+
!*** ../lib/md010.js ***!
|
|
2209
|
+
\***********************/
|
|
2210
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2211
|
+
|
|
1922
2212
|
"use strict";
|
|
1923
|
-
|
|
1924
|
-
|
|
2213
|
+
// @ts-check
|
|
2214
|
+
|
|
2215
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine;
|
|
2216
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1925
2217
|
var tabRe = /\t+/g;
|
|
1926
2218
|
module.exports = {
|
|
1927
2219
|
"names": ["MD010", "no-hard-tabs"],
|
|
@@ -1930,6 +2222,10 @@ module.exports = {
|
|
|
1930
2222
|
"function": function MD010(params, onError) {
|
|
1931
2223
|
var codeBlocks = params.config.code_blocks;
|
|
1932
2224
|
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
|
2225
|
+
var spacesPerTab = params.config.spaces_per_tab;
|
|
2226
|
+
var spaceMultiplier = (spacesPerTab === undefined) ?
|
|
2227
|
+
1 :
|
|
2228
|
+
Math.max(0, Number(spacesPerTab));
|
|
1933
2229
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
1934
2230
|
if (!inCode || includeCodeBlocks) {
|
|
1935
2231
|
var match = null;
|
|
@@ -1939,7 +2235,7 @@ module.exports = {
|
|
|
1939
2235
|
addError(onError, lineIndex + 1, "Column: " + column, null, [column, length_1], {
|
|
1940
2236
|
"editColumn": column,
|
|
1941
2237
|
"deleteCount": length_1,
|
|
1942
|
-
"insertText": "".padEnd(length_1)
|
|
2238
|
+
"insertText": "".padEnd(length_1 * spaceMultiplier)
|
|
1943
2239
|
});
|
|
1944
2240
|
}
|
|
1945
2241
|
}
|
|
@@ -1947,43 +2243,63 @@ module.exports = {
|
|
|
1947
2243
|
}
|
|
1948
2244
|
};
|
|
1949
2245
|
|
|
1950
|
-
|
|
1951
|
-
|
|
2246
|
+
|
|
2247
|
+
/***/ }),
|
|
2248
|
+
|
|
2249
|
+
/***/ "../lib/md011.js":
|
|
2250
|
+
/*!***********************!*\
|
|
2251
|
+
!*** ../lib/md011.js ***!
|
|
2252
|
+
\***********************/
|
|
2253
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2254
|
+
|
|
1952
2255
|
"use strict";
|
|
1953
|
-
|
|
1954
|
-
|
|
2256
|
+
// @ts-check
|
|
2257
|
+
|
|
2258
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine, overlapsAnyRange = _a.overlapsAnyRange;
|
|
2259
|
+
var _b = __webpack_require__(/*! ./cache */ "../lib/cache.js"), inlineCodeSpanRanges = _b.inlineCodeSpanRanges, lineMetadata = _b.lineMetadata;
|
|
2260
|
+
var reversedLinkRe = /(^|[^\\])\(([^)]+)\)\[([^\]^][^\]]*)](?!\()/g;
|
|
1955
2261
|
module.exports = {
|
|
1956
2262
|
"names": ["MD011", "no-reversed-links"],
|
|
1957
2263
|
"description": "Reversed link syntax",
|
|
1958
2264
|
"tags": ["links"],
|
|
1959
2265
|
"function": function MD011(params, onError) {
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
2266
|
+
var exclusions = inlineCodeSpanRanges();
|
|
2267
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
|
2268
|
+
if (!inCode && !onFence) {
|
|
2269
|
+
var match = null;
|
|
2270
|
+
while ((match = reversedLinkRe.exec(line)) !== null) {
|
|
2271
|
+
var reversedLink = match[0], preChar = match[1], linkText = match[2], linkDestination = match[3];
|
|
2272
|
+
var index = match.index + preChar.length;
|
|
2273
|
+
var length_1 = match[0].length - preChar.length;
|
|
2274
|
+
if (!linkText.endsWith("\\") &&
|
|
2275
|
+
!linkDestination.endsWith("\\") &&
|
|
2276
|
+
!overlapsAnyRange(exclusions, lineIndex, index, length_1)) {
|
|
2277
|
+
addError(onError, lineIndex + 1, reversedLink.slice(preChar.length), null, [index + 1, length_1], {
|
|
2278
|
+
"editColumn": index + 1,
|
|
2279
|
+
"deleteCount": length_1,
|
|
2280
|
+
"insertText": "[" + linkText + "](" + linkDestination + ")"
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
1977
2284
|
}
|
|
1978
2285
|
});
|
|
1979
2286
|
}
|
|
1980
2287
|
};
|
|
1981
2288
|
|
|
1982
|
-
|
|
1983
|
-
|
|
2289
|
+
|
|
2290
|
+
/***/ }),
|
|
2291
|
+
|
|
2292
|
+
/***/ "../lib/md012.js":
|
|
2293
|
+
/*!***********************!*\
|
|
2294
|
+
!*** ../lib/md012.js ***!
|
|
2295
|
+
\***********************/
|
|
2296
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2297
|
+
|
|
1984
2298
|
"use strict";
|
|
1985
|
-
|
|
1986
|
-
|
|
2299
|
+
// @ts-check
|
|
2300
|
+
|
|
2301
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, forEachLine = _a.forEachLine;
|
|
2302
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1987
2303
|
module.exports = {
|
|
1988
2304
|
"names": ["MD012", "no-multiple-blanks"],
|
|
1989
2305
|
"description": "Multiple consecutive blank lines",
|
|
@@ -2002,11 +2318,20 @@ module.exports = {
|
|
|
2002
2318
|
}
|
|
2003
2319
|
};
|
|
2004
2320
|
|
|
2005
|
-
|
|
2006
|
-
|
|
2321
|
+
|
|
2322
|
+
/***/ }),
|
|
2323
|
+
|
|
2324
|
+
/***/ "../lib/md013.js":
|
|
2325
|
+
/*!***********************!*\
|
|
2326
|
+
!*** ../lib/md013.js ***!
|
|
2327
|
+
\***********************/
|
|
2328
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2329
|
+
|
|
2007
2330
|
"use strict";
|
|
2008
|
-
|
|
2009
|
-
|
|
2331
|
+
// @ts-check
|
|
2332
|
+
|
|
2333
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, forEachHeading = _a.forEachHeading, forEachLine = _a.forEachLine, includesSorted = _a.includesSorted;
|
|
2334
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2010
2335
|
var longLineRePrefix = "^.{";
|
|
2011
2336
|
var longLineRePostfixRelaxed = "}.*\\s.*$";
|
|
2012
2337
|
var longLineRePostfixStrict = "}.+$";
|
|
@@ -2085,10 +2410,19 @@ module.exports = {
|
|
|
2085
2410
|
}
|
|
2086
2411
|
};
|
|
2087
2412
|
|
|
2088
|
-
|
|
2089
|
-
|
|
2413
|
+
|
|
2414
|
+
/***/ }),
|
|
2415
|
+
|
|
2416
|
+
/***/ "../lib/md014.js":
|
|
2417
|
+
/*!***********************!*\
|
|
2418
|
+
!*** ../lib/md014.js ***!
|
|
2419
|
+
\***********************/
|
|
2420
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2421
|
+
|
|
2090
2422
|
"use strict";
|
|
2091
|
-
|
|
2423
|
+
// @ts-check
|
|
2424
|
+
|
|
2425
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
2092
2426
|
var dollarCommandRe = /^(\s*)(\$\s+)/;
|
|
2093
2427
|
module.exports = {
|
|
2094
2428
|
"names": ["MD014", "commands-show-output"],
|
|
@@ -2129,11 +2463,20 @@ module.exports = {
|
|
|
2129
2463
|
}
|
|
2130
2464
|
};
|
|
2131
2465
|
|
|
2132
|
-
|
|
2133
|
-
|
|
2466
|
+
|
|
2467
|
+
/***/ }),
|
|
2468
|
+
|
|
2469
|
+
/***/ "../lib/md018.js":
|
|
2470
|
+
/*!***********************!*\
|
|
2471
|
+
!*** ../lib/md018.js ***!
|
|
2472
|
+
\***********************/
|
|
2473
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2474
|
+
|
|
2134
2475
|
"use strict";
|
|
2135
|
-
|
|
2136
|
-
|
|
2476
|
+
// @ts-check
|
|
2477
|
+
|
|
2478
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine;
|
|
2479
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2137
2480
|
module.exports = {
|
|
2138
2481
|
"names": ["MD018", "no-missing-space-atx"],
|
|
2139
2482
|
"description": "No space after hash on atx style heading",
|
|
@@ -2141,7 +2484,7 @@ module.exports = {
|
|
|
2141
2484
|
"function": function MD018(params, onError) {
|
|
2142
2485
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
2143
2486
|
if (!inCode &&
|
|
2144
|
-
/^#+[
|
|
2487
|
+
/^#+[^# \t]/.test(line) &&
|
|
2145
2488
|
!/#\s*$/.test(line) &&
|
|
2146
2489
|
!line.startsWith("#️⃣")) {
|
|
2147
2490
|
var hashCount = /^#+/.exec(line)[0].length;
|
|
@@ -2154,10 +2497,19 @@ module.exports = {
|
|
|
2154
2497
|
}
|
|
2155
2498
|
};
|
|
2156
2499
|
|
|
2157
|
-
|
|
2158
|
-
|
|
2500
|
+
|
|
2501
|
+
/***/ }),
|
|
2502
|
+
|
|
2503
|
+
/***/ "../lib/md019.js":
|
|
2504
|
+
/*!***********************!*\
|
|
2505
|
+
!*** ../lib/md019.js ***!
|
|
2506
|
+
\***********************/
|
|
2507
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2508
|
+
|
|
2159
2509
|
"use strict";
|
|
2160
|
-
|
|
2510
|
+
// @ts-check
|
|
2511
|
+
|
|
2512
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
2161
2513
|
module.exports = {
|
|
2162
2514
|
"names": ["MD019", "no-multiple-space-atx"],
|
|
2163
2515
|
"description": "Multiple spaces after hash on atx style heading",
|
|
@@ -2166,7 +2518,7 @@ module.exports = {
|
|
|
2166
2518
|
filterTokens(params, "heading_open", function (token) {
|
|
2167
2519
|
if (headingStyleFor(token) === "atx") {
|
|
2168
2520
|
var line = token.line, lineNumber = token.lineNumber;
|
|
2169
|
-
var match = /^(#+)(\
|
|
2521
|
+
var match = /^(#+)([ \t]{2,})(?:\S)/.exec(line);
|
|
2170
2522
|
if (match) {
|
|
2171
2523
|
var hashLength = match[1]["length"], spacesLength = match[2]["length"];
|
|
2172
2524
|
addErrorContext(onError, lineNumber, line.trim(), null, null, [1, hashLength + spacesLength + 1], {
|
|
@@ -2179,11 +2531,20 @@ module.exports = {
|
|
|
2179
2531
|
}
|
|
2180
2532
|
};
|
|
2181
2533
|
|
|
2182
|
-
|
|
2183
|
-
|
|
2534
|
+
|
|
2535
|
+
/***/ }),
|
|
2536
|
+
|
|
2537
|
+
/***/ "../lib/md020.js":
|
|
2538
|
+
/*!***********************!*\
|
|
2539
|
+
!*** ../lib/md020.js ***!
|
|
2540
|
+
\***********************/
|
|
2541
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2542
|
+
|
|
2184
2543
|
"use strict";
|
|
2185
|
-
|
|
2186
|
-
|
|
2544
|
+
// @ts-check
|
|
2545
|
+
|
|
2546
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine;
|
|
2547
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2187
2548
|
module.exports = {
|
|
2188
2549
|
"names": ["MD020", "no-missing-space-closed-atx"],
|
|
2189
2550
|
"description": "No space inside hashes on closed atx style heading",
|
|
@@ -2191,7 +2552,7 @@ module.exports = {
|
|
|
2191
2552
|
"function": function MD020(params, onError) {
|
|
2192
2553
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
2193
2554
|
if (!inCode) {
|
|
2194
|
-
var match = /^(#+)(\
|
|
2555
|
+
var match = /^(#+)([ \t]*)([^#]*?[^#\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
|
2195
2556
|
if (match) {
|
|
2196
2557
|
var leftHash = match[1], leftSpaceLength = match[2]["length"], content = match[3], rightSpaceLength = match[4]["length"], rightEscape = match[5], rightHash = match[6], trailSpaceLength = match[7]["length"];
|
|
2197
2558
|
var leftHashLength = leftHash.length;
|
|
@@ -2221,10 +2582,19 @@ module.exports = {
|
|
|
2221
2582
|
}
|
|
2222
2583
|
};
|
|
2223
2584
|
|
|
2224
|
-
|
|
2225
|
-
|
|
2585
|
+
|
|
2586
|
+
/***/ }),
|
|
2587
|
+
|
|
2588
|
+
/***/ "../lib/md021.js":
|
|
2589
|
+
/*!***********************!*\
|
|
2590
|
+
!*** ../lib/md021.js ***!
|
|
2591
|
+
\***********************/
|
|
2592
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2593
|
+
|
|
2226
2594
|
"use strict";
|
|
2227
|
-
|
|
2595
|
+
// @ts-check
|
|
2596
|
+
|
|
2597
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
2228
2598
|
module.exports = {
|
|
2229
2599
|
"names": ["MD021", "no-multiple-space-closed-atx"],
|
|
2230
2600
|
"description": "Multiple spaces inside hashes on closed atx style heading",
|
|
@@ -2233,7 +2603,7 @@ module.exports = {
|
|
|
2233
2603
|
filterTokens(params, "heading_open", function (token) {
|
|
2234
2604
|
if (headingStyleFor(token) === "atx_closed") {
|
|
2235
2605
|
var line = token.line, lineNumber = token.lineNumber;
|
|
2236
|
-
var match = /^(#+)(\
|
|
2606
|
+
var match = /^(#+)([ \t]+)([^#]+?)([ \t]+)(#+)(\s*)$/.exec(line);
|
|
2237
2607
|
if (match) {
|
|
2238
2608
|
var leftHash = match[1], leftSpaceLength = match[2]["length"], content = match[3], rightSpaceLength = match[4]["length"], rightHash = match[5], trailSpaceLength = match[6]["length"];
|
|
2239
2609
|
var left = leftSpaceLength > 1;
|
|
@@ -2263,10 +2633,19 @@ module.exports = {
|
|
|
2263
2633
|
}
|
|
2264
2634
|
};
|
|
2265
2635
|
|
|
2266
|
-
|
|
2267
|
-
|
|
2636
|
+
|
|
2637
|
+
/***/ }),
|
|
2638
|
+
|
|
2639
|
+
/***/ "../lib/md022.js":
|
|
2640
|
+
/*!***********************!*\
|
|
2641
|
+
!*** ../lib/md022.js ***!
|
|
2642
|
+
\***********************/
|
|
2643
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2644
|
+
|
|
2268
2645
|
"use strict";
|
|
2269
|
-
|
|
2646
|
+
// @ts-check
|
|
2647
|
+
|
|
2648
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, isBlankLine = _a.isBlankLine;
|
|
2270
2649
|
module.exports = {
|
|
2271
2650
|
"names": ["MD022", "blanks-around-headings", "blanks-around-headers"],
|
|
2272
2651
|
"description": "Headings should be surrounded by blank lines",
|
|
@@ -2302,10 +2681,19 @@ module.exports = {
|
|
|
2302
2681
|
}
|
|
2303
2682
|
};
|
|
2304
2683
|
|
|
2305
|
-
|
|
2306
|
-
|
|
2684
|
+
|
|
2685
|
+
/***/ }),
|
|
2686
|
+
|
|
2687
|
+
/***/ "../lib/md023.js":
|
|
2688
|
+
/*!***********************!*\
|
|
2689
|
+
!*** ../lib/md023.js ***!
|
|
2690
|
+
\***********************/
|
|
2691
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2692
|
+
|
|
2307
2693
|
"use strict";
|
|
2308
|
-
|
|
2694
|
+
// @ts-check
|
|
2695
|
+
|
|
2696
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
2309
2697
|
var spaceBeforeHeadingRe = /^((?:\s+)|(?:[>\s]+\s\s))[^>\s]/;
|
|
2310
2698
|
module.exports = {
|
|
2311
2699
|
"names": ["MD023", "heading-start-left", "header-start-left"],
|
|
@@ -2318,7 +2706,7 @@ module.exports = {
|
|
|
2318
2706
|
if (match) {
|
|
2319
2707
|
var prefixAndFirstChar = match[0], prefix = match[1];
|
|
2320
2708
|
var deleteCount = prefix.length;
|
|
2321
|
-
var prefixLengthNoSpace = prefix.
|
|
2709
|
+
var prefixLengthNoSpace = prefix.trimEnd().length;
|
|
2322
2710
|
if (prefixLengthNoSpace) {
|
|
2323
2711
|
deleteCount -= prefixLengthNoSpace - 1;
|
|
2324
2712
|
}
|
|
@@ -2331,10 +2719,19 @@ module.exports = {
|
|
|
2331
2719
|
}
|
|
2332
2720
|
};
|
|
2333
2721
|
|
|
2334
|
-
|
|
2335
|
-
|
|
2722
|
+
|
|
2723
|
+
/***/ }),
|
|
2724
|
+
|
|
2725
|
+
/***/ "../lib/md024.js":
|
|
2726
|
+
/*!***********************!*\
|
|
2727
|
+
!*** ../lib/md024.js ***!
|
|
2728
|
+
\***********************/
|
|
2729
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2730
|
+
|
|
2336
2731
|
"use strict";
|
|
2337
|
-
|
|
2732
|
+
// @ts-check
|
|
2733
|
+
|
|
2734
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachHeading = _a.forEachHeading;
|
|
2338
2735
|
module.exports = {
|
|
2339
2736
|
"names": ["MD024", "no-duplicate-heading", "no-duplicate-header"],
|
|
2340
2737
|
"description": "Multiple headings with the same content",
|
|
@@ -2368,13 +2765,22 @@ module.exports = {
|
|
|
2368
2765
|
}
|
|
2369
2766
|
};
|
|
2370
2767
|
|
|
2371
|
-
|
|
2372
|
-
|
|
2768
|
+
|
|
2769
|
+
/***/ }),
|
|
2770
|
+
|
|
2771
|
+
/***/ "../lib/md025.js":
|
|
2772
|
+
/*!***********************!*\
|
|
2773
|
+
!*** ../lib/md025.js ***!
|
|
2774
|
+
\***********************/
|
|
2775
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2776
|
+
|
|
2373
2777
|
"use strict";
|
|
2374
|
-
|
|
2778
|
+
// @ts-check
|
|
2779
|
+
|
|
2780
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, frontMatterHasTitle = _a.frontMatterHasTitle;
|
|
2375
2781
|
module.exports = {
|
|
2376
2782
|
"names": ["MD025", "single-title", "single-h1"],
|
|
2377
|
-
"description": "Multiple top
|
|
2783
|
+
"description": "Multiple top-level headings in the same document",
|
|
2378
2784
|
"tags": ["headings", "headers"],
|
|
2379
2785
|
"function": function MD025(params, onError) {
|
|
2380
2786
|
var level = Number(params.config.level || 1);
|
|
@@ -2394,24 +2800,33 @@ module.exports = {
|
|
|
2394
2800
|
}
|
|
2395
2801
|
};
|
|
2396
2802
|
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2803
|
+
|
|
2804
|
+
/***/ }),
|
|
2805
|
+
|
|
2806
|
+
/***/ "../lib/md026.js":
|
|
2807
|
+
/*!***********************!*\
|
|
2808
|
+
!*** ../lib/md026.js ***!
|
|
2809
|
+
\***********************/
|
|
2810
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2811
|
+
|
|
2812
|
+
"use strict";
|
|
2813
|
+
// @ts-check
|
|
2814
|
+
|
|
2815
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, allPunctuationNoQuestion = _a.allPunctuationNoQuestion, escapeForRegExp = _a.escapeForRegExp, forEachHeading = _a.forEachHeading;
|
|
2816
|
+
var endOfLineHtmlEntityRe = /&#?[0-9a-zA-Z]+;$/;
|
|
2817
|
+
module.exports = {
|
|
2402
2818
|
"names": ["MD026", "no-trailing-punctuation"],
|
|
2403
2819
|
"description": "Trailing punctuation in heading",
|
|
2404
2820
|
"tags": ["headings", "headers"],
|
|
2405
2821
|
"function": function MD026(params, onError) {
|
|
2406
2822
|
var punctuation = params.config.punctuation;
|
|
2407
|
-
punctuation =
|
|
2408
|
-
String((punctuation === undefined) ? allPunctuation : punctuation);
|
|
2823
|
+
punctuation = String((punctuation === undefined) ? allPunctuationNoQuestion : punctuation);
|
|
2409
2824
|
var trailingPunctuationRe = new RegExp("\\s*[" + escapeForRegExp(punctuation) + "]+$");
|
|
2410
2825
|
forEachHeading(params, function (heading) {
|
|
2411
2826
|
var line = heading.line, lineNumber = heading.lineNumber;
|
|
2412
2827
|
var trimmedLine = line.replace(/[\s#]*$/, "");
|
|
2413
2828
|
var match = trailingPunctuationRe.exec(trimmedLine);
|
|
2414
|
-
if (match) {
|
|
2829
|
+
if (match && !endOfLineHtmlEntityRe.test(trimmedLine)) {
|
|
2415
2830
|
var fullMatch = match[0];
|
|
2416
2831
|
var column = match.index + 1;
|
|
2417
2832
|
var length_1 = fullMatch.length;
|
|
@@ -2424,10 +2839,19 @@ module.exports = {
|
|
|
2424
2839
|
}
|
|
2425
2840
|
};
|
|
2426
2841
|
|
|
2427
|
-
|
|
2428
|
-
|
|
2842
|
+
|
|
2843
|
+
/***/ }),
|
|
2844
|
+
|
|
2845
|
+
/***/ "../lib/md027.js":
|
|
2846
|
+
/*!***********************!*\
|
|
2847
|
+
!*** ../lib/md027.js ***!
|
|
2848
|
+
\***********************/
|
|
2849
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2850
|
+
|
|
2429
2851
|
"use strict";
|
|
2430
|
-
|
|
2852
|
+
// @ts-check
|
|
2853
|
+
|
|
2854
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, newLineRe = _a.newLineRe;
|
|
2431
2855
|
var spaceAfterBlockQuoteRe = /^((?:\s*>)+)(\s{2,})\S/;
|
|
2432
2856
|
module.exports = {
|
|
2433
2857
|
"names": ["MD027", "no-multiple-space-blockquote"],
|
|
@@ -2470,10 +2894,19 @@ module.exports = {
|
|
|
2470
2894
|
}
|
|
2471
2895
|
};
|
|
2472
2896
|
|
|
2473
|
-
|
|
2474
|
-
|
|
2897
|
+
|
|
2898
|
+
/***/ }),
|
|
2899
|
+
|
|
2900
|
+
/***/ "../lib/md028.js":
|
|
2901
|
+
/*!***********************!*\
|
|
2902
|
+
!*** ../lib/md028.js ***!
|
|
2903
|
+
\***********************/
|
|
2904
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2905
|
+
|
|
2475
2906
|
"use strict";
|
|
2476
|
-
|
|
2907
|
+
// @ts-check
|
|
2908
|
+
|
|
2909
|
+
var addError = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addError;
|
|
2477
2910
|
module.exports = {
|
|
2478
2911
|
"names": ["MD028", "no-blanks-blockquote"],
|
|
2479
2912
|
"description": "Blank line inside blockquote",
|
|
@@ -2485,9 +2918,7 @@ module.exports = {
|
|
|
2485
2918
|
if ((token.type === "blockquote_open") &&
|
|
2486
2919
|
(prevToken.type === "blockquote_close")) {
|
|
2487
2920
|
for (var lineNumber = prevLineNumber; lineNumber < token.lineNumber; lineNumber++) {
|
|
2488
|
-
addError(onError, lineNumber
|
|
2489
|
-
"deleteCount": -1
|
|
2490
|
-
});
|
|
2921
|
+
addError(onError, lineNumber);
|
|
2491
2922
|
}
|
|
2492
2923
|
}
|
|
2493
2924
|
prevToken = token;
|
|
@@ -2498,11 +2929,20 @@ module.exports = {
|
|
|
2498
2929
|
}
|
|
2499
2930
|
};
|
|
2500
2931
|
|
|
2501
|
-
|
|
2502
|
-
|
|
2932
|
+
|
|
2933
|
+
/***/ }),
|
|
2934
|
+
|
|
2935
|
+
/***/ "../lib/md029.js":
|
|
2936
|
+
/*!***********************!*\
|
|
2937
|
+
!*** ../lib/md029.js ***!
|
|
2938
|
+
\***********************/
|
|
2939
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2940
|
+
|
|
2503
2941
|
"use strict";
|
|
2504
|
-
|
|
2505
|
-
|
|
2942
|
+
// @ts-check
|
|
2943
|
+
|
|
2944
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, orderedListItemMarkerRe = _a.orderedListItemMarkerRe, rangeFromRegExp = _a.rangeFromRegExp;
|
|
2945
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2506
2946
|
var listStyleExamples = {
|
|
2507
2947
|
"one": "1/1/1",
|
|
2508
2948
|
"ordered": "1/2/3",
|
|
@@ -2559,11 +2999,20 @@ module.exports = {
|
|
|
2559
2999
|
}
|
|
2560
3000
|
};
|
|
2561
3001
|
|
|
2562
|
-
|
|
2563
|
-
|
|
3002
|
+
|
|
3003
|
+
/***/ }),
|
|
3004
|
+
|
|
3005
|
+
/***/ "../lib/md030.js":
|
|
3006
|
+
/*!***********************!*\
|
|
3007
|
+
!*** ../lib/md030.js ***!
|
|
3008
|
+
\***********************/
|
|
3009
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3010
|
+
|
|
2564
3011
|
"use strict";
|
|
2565
|
-
|
|
2566
|
-
|
|
3012
|
+
// @ts-check
|
|
3013
|
+
|
|
3014
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
3015
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2567
3016
|
module.exports = {
|
|
2568
3017
|
"names": ["MD030", "list-marker-space"],
|
|
2569
3018
|
"description": "Spaces after list markers",
|
|
@@ -2599,11 +3048,20 @@ module.exports = {
|
|
|
2599
3048
|
}
|
|
2600
3049
|
};
|
|
2601
3050
|
|
|
2602
|
-
|
|
2603
|
-
|
|
3051
|
+
|
|
3052
|
+
/***/ }),
|
|
3053
|
+
|
|
3054
|
+
/***/ "../lib/md031.js":
|
|
3055
|
+
/*!***********************!*\
|
|
3056
|
+
!*** ../lib/md031.js ***!
|
|
3057
|
+
\***********************/
|
|
3058
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3059
|
+
|
|
2604
3060
|
"use strict";
|
|
2605
|
-
|
|
2606
|
-
|
|
3061
|
+
// @ts-check
|
|
3062
|
+
|
|
3063
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine, isBlankLine = _a.isBlankLine;
|
|
3064
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2607
3065
|
var codeFencePrefixRe = /^(.*?)\s*[`~]/;
|
|
2608
3066
|
module.exports = {
|
|
2609
3067
|
"names": ["MD031", "blanks-around-fences"],
|
|
@@ -2630,11 +3088,20 @@ module.exports = {
|
|
|
2630
3088
|
}
|
|
2631
3089
|
};
|
|
2632
3090
|
|
|
2633
|
-
|
|
2634
|
-
|
|
3091
|
+
|
|
3092
|
+
/***/ }),
|
|
3093
|
+
|
|
3094
|
+
/***/ "../lib/md032.js":
|
|
3095
|
+
/*!***********************!*\
|
|
3096
|
+
!*** ../lib/md032.js ***!
|
|
3097
|
+
\***********************/
|
|
3098
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3099
|
+
|
|
2635
3100
|
"use strict";
|
|
2636
|
-
|
|
2637
|
-
|
|
3101
|
+
// @ts-check
|
|
3102
|
+
|
|
3103
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, isBlankLine = _a.isBlankLine;
|
|
3104
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2638
3105
|
var quotePrefixRe = /^[>\s]*/;
|
|
2639
3106
|
module.exports = {
|
|
2640
3107
|
"names": ["MD032", "blanks-around-lists"],
|
|
@@ -2646,7 +3113,7 @@ module.exports = {
|
|
|
2646
3113
|
var firstIndex = list.open.map[0];
|
|
2647
3114
|
if (!isBlankLine(lines[firstIndex - 1])) {
|
|
2648
3115
|
var line = lines[firstIndex];
|
|
2649
|
-
var quotePrefix = line.match(quotePrefixRe)[0].
|
|
3116
|
+
var quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
|
|
2650
3117
|
addErrorContext(onError, firstIndex + 1, line.trim(), null, null, null, {
|
|
2651
3118
|
"insertText": quotePrefix + "\n"
|
|
2652
3119
|
});
|
|
@@ -2654,7 +3121,7 @@ module.exports = {
|
|
|
2654
3121
|
var lastIndex = list.lastLineIndex - 1;
|
|
2655
3122
|
if (!isBlankLine(lines[lastIndex + 1])) {
|
|
2656
3123
|
var line = lines[lastIndex];
|
|
2657
|
-
var quotePrefix = line.match(quotePrefixRe)[0].
|
|
3124
|
+
var quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
|
|
2658
3125
|
addErrorContext(onError, lastIndex + 1, line.trim(), null, null, null, {
|
|
2659
3126
|
"lineNumber": lastIndex + 2,
|
|
2660
3127
|
"insertText": quotePrefix + "\n"
|
|
@@ -2664,11 +3131,20 @@ module.exports = {
|
|
|
2664
3131
|
}
|
|
2665
3132
|
};
|
|
2666
3133
|
|
|
2667
|
-
|
|
2668
|
-
|
|
3134
|
+
|
|
3135
|
+
/***/ }),
|
|
3136
|
+
|
|
3137
|
+
/***/ "../lib/md033.js":
|
|
3138
|
+
/*!***********************!*\
|
|
3139
|
+
!*** ../lib/md033.js ***!
|
|
3140
|
+
\***********************/
|
|
3141
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3142
|
+
|
|
2669
3143
|
"use strict";
|
|
2670
|
-
|
|
2671
|
-
|
|
3144
|
+
// @ts-check
|
|
3145
|
+
|
|
3146
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine, unescapeMarkdown = _a.unescapeMarkdown;
|
|
3147
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2672
3148
|
var htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)\/?>/g;
|
|
2673
3149
|
var linkDestinationRe = /]\(\s*$/;
|
|
2674
3150
|
var inlineCodeRe = /^[^`]*(`+[^`]+`+[^`]+)*`+[^`]*$/;
|
|
@@ -2706,10 +3182,19 @@ module.exports = {
|
|
|
2706
3182
|
}
|
|
2707
3183
|
};
|
|
2708
3184
|
|
|
2709
|
-
|
|
2710
|
-
|
|
3185
|
+
|
|
3186
|
+
/***/ }),
|
|
3187
|
+
|
|
3188
|
+
/***/ "../lib/md034.js":
|
|
3189
|
+
/*!***********************!*\
|
|
3190
|
+
!*** ../lib/md034.js ***!
|
|
3191
|
+
\***********************/
|
|
3192
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3193
|
+
|
|
2711
3194
|
"use strict";
|
|
2712
|
-
|
|
3195
|
+
// @ts-check
|
|
3196
|
+
|
|
3197
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, bareUrlRe = _a.bareUrlRe, filterTokens = _a.filterTokens;
|
|
2713
3198
|
module.exports = {
|
|
2714
3199
|
"names": ["MD034", "no-bare-urls"],
|
|
2715
3200
|
"description": "Bare URL used",
|
|
@@ -2758,10 +3243,19 @@ module.exports = {
|
|
|
2758
3243
|
}
|
|
2759
3244
|
};
|
|
2760
3245
|
|
|
2761
|
-
|
|
2762
|
-
|
|
3246
|
+
|
|
3247
|
+
/***/ }),
|
|
3248
|
+
|
|
3249
|
+
/***/ "../lib/md035.js":
|
|
3250
|
+
/*!***********************!*\
|
|
3251
|
+
!*** ../lib/md035.js ***!
|
|
3252
|
+
\***********************/
|
|
3253
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3254
|
+
|
|
2763
3255
|
"use strict";
|
|
2764
|
-
|
|
3256
|
+
// @ts-check
|
|
3257
|
+
|
|
3258
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens;
|
|
2765
3259
|
module.exports = {
|
|
2766
3260
|
"names": ["MD035", "hr-style"],
|
|
2767
3261
|
"description": "Horizontal rule style",
|
|
@@ -2778,10 +3272,19 @@ module.exports = {
|
|
|
2778
3272
|
}
|
|
2779
3273
|
};
|
|
2780
3274
|
|
|
2781
|
-
|
|
2782
|
-
|
|
3275
|
+
|
|
3276
|
+
/***/ }),
|
|
3277
|
+
|
|
3278
|
+
/***/ "../lib/md036.js":
|
|
3279
|
+
/*!***********************!*\
|
|
3280
|
+
!*** ../lib/md036.js ***!
|
|
3281
|
+
\***********************/
|
|
3282
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3283
|
+
|
|
2783
3284
|
"use strict";
|
|
2784
|
-
|
|
3285
|
+
// @ts-check
|
|
3286
|
+
|
|
3287
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, allPunctuation = _a.allPunctuation;
|
|
2785
3288
|
module.exports = {
|
|
2786
3289
|
"names": ["MD036", "no-emphasis-as-heading", "no-emphasis-as-header"],
|
|
2787
3290
|
"description": "Emphasis used instead of a heading",
|
|
@@ -2834,15 +3337,25 @@ module.exports = {
|
|
|
2834
3337
|
}
|
|
2835
3338
|
};
|
|
2836
3339
|
|
|
2837
|
-
|
|
2838
|
-
|
|
3340
|
+
|
|
3341
|
+
/***/ }),
|
|
3342
|
+
|
|
3343
|
+
/***/ "../lib/md037.js":
|
|
3344
|
+
/*!***********************!*\
|
|
3345
|
+
!*** ../lib/md037.js ***!
|
|
3346
|
+
\***********************/
|
|
3347
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3348
|
+
|
|
2839
3349
|
"use strict";
|
|
2840
|
-
|
|
2841
|
-
|
|
3350
|
+
// @ts-check
|
|
3351
|
+
|
|
3352
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, emphasisMarkersInContent = _a.emphasisMarkersInContent, forEachLine = _a.forEachLine, isBlankLine = _a.isBlankLine;
|
|
3353
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2842
3354
|
var emphasisRe = /(^|[^\\]|\\\\)(?:(\*\*?\*?)|(__?_?))/g;
|
|
2843
3355
|
var asteriskListItemMarkerRe = /^([\s>]*)\*(\s+)/;
|
|
2844
3356
|
var leftSpaceRe = /^\s+/;
|
|
2845
3357
|
var rightSpaceRe = /\s+$/;
|
|
3358
|
+
var tablePipeRe = /\|/;
|
|
2846
3359
|
module.exports = {
|
|
2847
3360
|
"names": ["MD037", "no-space-in-emphasis"],
|
|
2848
3361
|
"description": "Spaces inside emphasis markers",
|
|
@@ -2859,18 +3372,19 @@ module.exports = {
|
|
|
2859
3372
|
pendingError = null;
|
|
2860
3373
|
}
|
|
2861
3374
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2862
|
-
function handleRunEnd(line, lineIndex, contextLength, match, matchIndex) {
|
|
3375
|
+
function handleRunEnd(line, lineIndex, contextLength, match, matchIndex, inTable) {
|
|
2863
3376
|
// Close current run
|
|
2864
3377
|
var content = line.substring(emphasisIndex, matchIndex);
|
|
2865
3378
|
if (!emphasisLength) {
|
|
2866
|
-
content = content.
|
|
3379
|
+
content = content.trimStart();
|
|
2867
3380
|
}
|
|
2868
3381
|
if (!match) {
|
|
2869
|
-
content = content.
|
|
3382
|
+
content = content.trimEnd();
|
|
2870
3383
|
}
|
|
2871
3384
|
var leftSpace = leftSpaceRe.test(content);
|
|
2872
3385
|
var rightSpace = rightSpaceRe.test(content);
|
|
2873
|
-
if (leftSpace || rightSpace)
|
|
3386
|
+
if ((leftSpace || rightSpace) &&
|
|
3387
|
+
(!inTable || !tablePipeRe.test(content))) {
|
|
2874
3388
|
// Report the violation
|
|
2875
3389
|
var contextStart = emphasisIndex - emphasisLength;
|
|
2876
3390
|
var contextEnd = matchIndex + contextLength;
|
|
@@ -2899,13 +3413,21 @@ module.exports = {
|
|
|
2899
3413
|
// Initialize
|
|
2900
3414
|
var ignoreMarkersByLine = emphasisMarkersInContent(params);
|
|
2901
3415
|
resetRunTracking();
|
|
2902
|
-
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak) {
|
|
3416
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) {
|
|
2903
3417
|
var onItemStart = (inItem === 1);
|
|
2904
|
-
if (inCode ||
|
|
3418
|
+
if (inCode ||
|
|
3419
|
+
onFence ||
|
|
3420
|
+
inTable ||
|
|
3421
|
+
onBreak ||
|
|
3422
|
+
onItemStart ||
|
|
3423
|
+
isBlankLine(line)) {
|
|
2905
3424
|
// Emphasis resets when leaving a block
|
|
2906
3425
|
resetRunTracking();
|
|
2907
3426
|
}
|
|
2908
|
-
if (inCode ||
|
|
3427
|
+
if (inCode ||
|
|
3428
|
+
onFence ||
|
|
3429
|
+
onBreak ||
|
|
3430
|
+
inMath) {
|
|
2909
3431
|
// Emphasis has no meaning here
|
|
2910
3432
|
return;
|
|
2911
3433
|
}
|
|
@@ -2936,11 +3458,13 @@ module.exports = {
|
|
|
2936
3458
|
if (matchLength === effectiveEmphasisLength) {
|
|
2937
3459
|
// Ending an existing run, report any pending error
|
|
2938
3460
|
if (pendingError) {
|
|
3461
|
+
// @ts-ignore
|
|
2939
3462
|
addErrorContext.apply(void 0, pendingError);
|
|
2940
3463
|
pendingError = null;
|
|
2941
3464
|
}
|
|
2942
|
-
var error = handleRunEnd(line, lineIndex, effectiveEmphasisLength, match, matchIndex);
|
|
3465
|
+
var error = handleRunEnd(line, lineIndex, effectiveEmphasisLength, match, matchIndex, inTable);
|
|
2943
3466
|
if (error) {
|
|
3467
|
+
// @ts-ignore
|
|
2944
3468
|
addErrorContext.apply(void 0, error);
|
|
2945
3469
|
}
|
|
2946
3470
|
// Reset
|
|
@@ -2972,7 +3496,7 @@ module.exports = {
|
|
|
2972
3496
|
}
|
|
2973
3497
|
if (emphasisIndex !== -1) {
|
|
2974
3498
|
pendingError = pendingError ||
|
|
2975
|
-
handleRunEnd(line, lineIndex, 0, null, line.length);
|
|
3499
|
+
handleRunEnd(line, lineIndex, 0, null, line.length, inTable);
|
|
2976
3500
|
// Adjust for pending run on new line
|
|
2977
3501
|
emphasisIndex = 0;
|
|
2978
3502
|
emphasisLength = 0;
|
|
@@ -2981,10 +3505,19 @@ module.exports = {
|
|
|
2981
3505
|
}
|
|
2982
3506
|
};
|
|
2983
3507
|
|
|
2984
|
-
|
|
2985
|
-
|
|
3508
|
+
|
|
3509
|
+
/***/ }),
|
|
3510
|
+
|
|
3511
|
+
/***/ "../lib/md038.js":
|
|
3512
|
+
/*!***********************!*\
|
|
3513
|
+
!*** ../lib/md038.js ***!
|
|
3514
|
+
\***********************/
|
|
3515
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3516
|
+
|
|
2986
3517
|
"use strict";
|
|
2987
|
-
|
|
3518
|
+
// @ts-check
|
|
3519
|
+
|
|
3520
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, forEachInlineCodeSpan = _a.forEachInlineCodeSpan, newLineRe = _a.newLineRe;
|
|
2988
3521
|
var leftSpaceRe = /^\s([^`]|$)/;
|
|
2989
3522
|
var rightSpaceRe = /[^`]\s$/;
|
|
2990
3523
|
var singleLeftRightSpaceRe = /^\s(?:\S.*\S|\S)\s$/;
|
|
@@ -3035,10 +3568,19 @@ module.exports = {
|
|
|
3035
3568
|
}
|
|
3036
3569
|
};
|
|
3037
3570
|
|
|
3038
|
-
|
|
3039
|
-
|
|
3571
|
+
|
|
3572
|
+
/***/ }),
|
|
3573
|
+
|
|
3574
|
+
/***/ "../lib/md039.js":
|
|
3575
|
+
/*!***********************!*\
|
|
3576
|
+
!*** ../lib/md039.js ***!
|
|
3577
|
+
\***********************/
|
|
3578
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3579
|
+
|
|
3040
3580
|
"use strict";
|
|
3041
|
-
|
|
3581
|
+
// @ts-check
|
|
3582
|
+
|
|
3583
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
3042
3584
|
var spaceInLinkRe = /\[(?:\s+(?:[^\]]*?)\s*|(?:[^\]]*?)\s+)](?=\(\S*\))/;
|
|
3043
3585
|
module.exports = {
|
|
3044
3586
|
"names": ["MD039", "no-space-in-links"],
|
|
@@ -3059,8 +3601,8 @@ module.exports = {
|
|
|
3059
3601
|
}
|
|
3060
3602
|
else if (type === "link_close") {
|
|
3061
3603
|
inLink = false;
|
|
3062
|
-
var left = linkText.
|
|
3063
|
-
var right = linkText.
|
|
3604
|
+
var left = linkText.trimStart().length !== linkText.length;
|
|
3605
|
+
var right = linkText.trimEnd().length !== linkText.length;
|
|
3064
3606
|
if (left || right) {
|
|
3065
3607
|
var line = params.lines[lineNumber - 1];
|
|
3066
3608
|
var range = null;
|
|
@@ -3092,10 +3634,19 @@ module.exports = {
|
|
|
3092
3634
|
}
|
|
3093
3635
|
};
|
|
3094
3636
|
|
|
3095
|
-
|
|
3096
|
-
|
|
3637
|
+
|
|
3638
|
+
/***/ }),
|
|
3639
|
+
|
|
3640
|
+
/***/ "../lib/md040.js":
|
|
3641
|
+
/*!***********************!*\
|
|
3642
|
+
!*** ../lib/md040.js ***!
|
|
3643
|
+
\***********************/
|
|
3644
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3645
|
+
|
|
3097
3646
|
"use strict";
|
|
3098
|
-
|
|
3647
|
+
// @ts-check
|
|
3648
|
+
|
|
3649
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
3099
3650
|
module.exports = {
|
|
3100
3651
|
"names": ["MD040", "fenced-code-language"],
|
|
3101
3652
|
"description": "Fenced code blocks should have a language specified",
|
|
@@ -3109,24 +3660,46 @@ module.exports = {
|
|
|
3109
3660
|
}
|
|
3110
3661
|
};
|
|
3111
3662
|
|
|
3112
|
-
|
|
3113
|
-
|
|
3663
|
+
|
|
3664
|
+
/***/ }),
|
|
3665
|
+
|
|
3666
|
+
/***/ "../lib/md041.js":
|
|
3667
|
+
/*!***********************!*\
|
|
3668
|
+
!*** ../lib/md041.js ***!
|
|
3669
|
+
\***********************/
|
|
3670
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3671
|
+
|
|
3114
3672
|
"use strict";
|
|
3115
|
-
|
|
3673
|
+
// @ts-check
|
|
3674
|
+
|
|
3675
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, frontMatterHasTitle = _a.frontMatterHasTitle;
|
|
3116
3676
|
module.exports = {
|
|
3117
3677
|
"names": ["MD041", "first-line-heading", "first-line-h1"],
|
|
3118
|
-
"description": "First line in file should be a top
|
|
3678
|
+
"description": "First line in a file should be a top-level heading",
|
|
3119
3679
|
"tags": ["headings", "headers"],
|
|
3120
3680
|
"function": function MD041(params, onError) {
|
|
3121
3681
|
var level = Number(params.config.level || 1);
|
|
3122
3682
|
var tag = "h" + level;
|
|
3123
3683
|
var foundFrontMatterTitle = frontMatterHasTitle(params.frontMatterLines, params.config.front_matter_title);
|
|
3124
3684
|
if (!foundFrontMatterTitle) {
|
|
3685
|
+
var htmlHeadingRe_1 = new RegExp("^<h" + level + "[ />]", "i");
|
|
3125
3686
|
params.tokens.every(function (token) {
|
|
3687
|
+
var isError = false;
|
|
3126
3688
|
if (token.type === "html_block") {
|
|
3127
|
-
|
|
3689
|
+
if (token.content.startsWith("<!--")) {
|
|
3690
|
+
// Ignore leading HTML comments
|
|
3691
|
+
return true;
|
|
3692
|
+
}
|
|
3693
|
+
else if (!htmlHeadingRe_1.test(token.content)) {
|
|
3694
|
+
// Something other than an HTML heading
|
|
3695
|
+
isError = true;
|
|
3696
|
+
}
|
|
3128
3697
|
}
|
|
3129
|
-
if ((token.type !== "heading_open") || (token.tag !== tag)) {
|
|
3698
|
+
else if ((token.type !== "heading_open") || (token.tag !== tag)) {
|
|
3699
|
+
// Something other than a Markdown heading
|
|
3700
|
+
isError = true;
|
|
3701
|
+
}
|
|
3702
|
+
if (isError) {
|
|
3130
3703
|
addErrorContext(onError, token.lineNumber, token.line);
|
|
3131
3704
|
}
|
|
3132
3705
|
return false;
|
|
@@ -3135,10 +3708,19 @@ module.exports = {
|
|
|
3135
3708
|
}
|
|
3136
3709
|
};
|
|
3137
3710
|
|
|
3138
|
-
|
|
3139
|
-
|
|
3711
|
+
|
|
3712
|
+
/***/ }),
|
|
3713
|
+
|
|
3714
|
+
/***/ "../lib/md042.js":
|
|
3715
|
+
/*!***********************!*\
|
|
3716
|
+
!*** ../lib/md042.js ***!
|
|
3717
|
+
\***********************/
|
|
3718
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3719
|
+
|
|
3140
3720
|
"use strict";
|
|
3141
|
-
|
|
3721
|
+
// @ts-check
|
|
3722
|
+
|
|
3723
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, rangeFromRegExp = _a.rangeFromRegExp;
|
|
3142
3724
|
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))/;
|
|
3143
3725
|
module.exports = {
|
|
3144
3726
|
"names": ["MD042", "no-empty-links"],
|
|
@@ -3174,10 +3756,19 @@ module.exports = {
|
|
|
3174
3756
|
}
|
|
3175
3757
|
};
|
|
3176
3758
|
|
|
3177
|
-
|
|
3178
|
-
|
|
3759
|
+
|
|
3760
|
+
/***/ }),
|
|
3761
|
+
|
|
3762
|
+
/***/ "../lib/md043.js":
|
|
3763
|
+
/*!***********************!*\
|
|
3764
|
+
!*** ../lib/md043.js ***!
|
|
3765
|
+
\***********************/
|
|
3766
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3767
|
+
|
|
3179
3768
|
"use strict";
|
|
3180
|
-
|
|
3769
|
+
// @ts-check
|
|
3770
|
+
|
|
3771
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, addErrorDetailIf = _a.addErrorDetailIf, forEachHeading = _a.forEachHeading;
|
|
3181
3772
|
module.exports = {
|
|
3182
3773
|
"names": ["MD043", "required-headings", "required-headers"],
|
|
3183
3774
|
"description": "Required heading structure",
|
|
@@ -3186,44 +3777,67 @@ module.exports = {
|
|
|
3186
3777
|
var requiredHeadings = params.config.headings || params.config.headers;
|
|
3187
3778
|
if (Array.isArray(requiredHeadings)) {
|
|
3188
3779
|
var levels_1 = {};
|
|
3189
|
-
[1, 2, 3, 4, 5, 6].forEach(function
|
|
3780
|
+
[1, 2, 3, 4, 5, 6].forEach(function (level) {
|
|
3190
3781
|
levels_1["h" + level] = "######".substr(-level);
|
|
3191
3782
|
});
|
|
3192
3783
|
var i_1 = 0;
|
|
3193
|
-
var
|
|
3194
|
-
var
|
|
3195
|
-
|
|
3196
|
-
|
|
3784
|
+
var matchAny_1 = false;
|
|
3785
|
+
var hasError_1 = false;
|
|
3786
|
+
var anyHeadings_1 = false;
|
|
3787
|
+
// eslint-disable-next-line func-style
|
|
3788
|
+
var getExpected_1 = function () { return requiredHeadings[i_1++] || "[None]"; };
|
|
3789
|
+
forEachHeading(params, function (heading, content) {
|
|
3790
|
+
if (!hasError_1) {
|
|
3791
|
+
anyHeadings_1 = true;
|
|
3197
3792
|
var actual = levels_1[heading.tag] + " " + content;
|
|
3198
|
-
var expected =
|
|
3793
|
+
var expected = getExpected_1();
|
|
3199
3794
|
if (expected === "*") {
|
|
3200
|
-
|
|
3795
|
+
var nextExpected = getExpected_1();
|
|
3796
|
+
if (nextExpected.toLowerCase() !== actual.toLowerCase()) {
|
|
3797
|
+
matchAny_1 = true;
|
|
3798
|
+
i_1--;
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
else if (expected === "+") {
|
|
3802
|
+
matchAny_1 = true;
|
|
3201
3803
|
}
|
|
3202
3804
|
else if (expected.toLowerCase() === actual.toLowerCase()) {
|
|
3203
|
-
|
|
3805
|
+
matchAny_1 = false;
|
|
3204
3806
|
}
|
|
3205
|
-
else if (
|
|
3807
|
+
else if (matchAny_1) {
|
|
3206
3808
|
i_1--;
|
|
3207
3809
|
}
|
|
3208
3810
|
else {
|
|
3209
3811
|
addErrorDetailIf(onError, heading.lineNumber, expected, actual);
|
|
3210
|
-
|
|
3812
|
+
hasError_1 = true;
|
|
3211
3813
|
}
|
|
3212
3814
|
}
|
|
3213
3815
|
});
|
|
3214
|
-
|
|
3816
|
+
var extraHeadings = requiredHeadings.length - i_1;
|
|
3817
|
+
if (!hasError_1 &&
|
|
3818
|
+
((extraHeadings > 1) ||
|
|
3819
|
+
((extraHeadings === 1) && (requiredHeadings[i_1] !== "*"))) &&
|
|
3820
|
+
(anyHeadings_1 || !requiredHeadings.every(function (heading) { return heading === "*"; }))) {
|
|
3215
3821
|
addErrorContext(onError, params.lines.length, requiredHeadings[i_1]);
|
|
3216
3822
|
}
|
|
3217
3823
|
}
|
|
3218
3824
|
}
|
|
3219
3825
|
};
|
|
3220
3826
|
|
|
3221
|
-
|
|
3222
|
-
|
|
3827
|
+
|
|
3828
|
+
/***/ }),
|
|
3829
|
+
|
|
3830
|
+
/***/ "../lib/md044.js":
|
|
3831
|
+
/*!***********************!*\
|
|
3832
|
+
!*** ../lib/md044.js ***!
|
|
3833
|
+
\***********************/
|
|
3834
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3835
|
+
|
|
3223
3836
|
"use strict";
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
var
|
|
3837
|
+
// @ts-check
|
|
3838
|
+
|
|
3839
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, bareUrlRe = _a.bareUrlRe, escapeForRegExp = _a.escapeForRegExp, forEachLine = _a.forEachLine, overlapsAnyRange = _a.overlapsAnyRange, linkRe = _a.linkRe, linkReferenceRe = _a.linkReferenceRe;
|
|
3840
|
+
var _b = __webpack_require__(/*! ./cache */ "../lib/cache.js"), inlineCodeSpanRanges = _b.inlineCodeSpanRanges, lineMetadata = _b.lineMetadata;
|
|
3227
3841
|
module.exports = {
|
|
3228
3842
|
"names": ["MD044", "proper-names"],
|
|
3229
3843
|
"description": "Proper names should have the correct capitalization",
|
|
@@ -3231,80 +3845,75 @@ module.exports = {
|
|
|
3231
3845
|
"function": function MD044(params, onError) {
|
|
3232
3846
|
var names = params.config.names;
|
|
3233
3847
|
names = Array.isArray(names) ? names : [];
|
|
3848
|
+
names.sort(function (a, b) { return (b.length - a.length) || a.localeCompare(b); });
|
|
3234
3849
|
var codeBlocks = params.config.code_blocks;
|
|
3235
3850
|
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
else if (type === "link_close") {
|
|
3246
|
-
inAutoLink = false;
|
|
3851
|
+
var exclusions = [];
|
|
3852
|
+
forEachLine(lineMetadata(), function (line, lineIndex) {
|
|
3853
|
+
if (linkReferenceRe.test(line)) {
|
|
3854
|
+
exclusions.push([lineIndex, 0, line.length]);
|
|
3855
|
+
}
|
|
3856
|
+
else {
|
|
3857
|
+
var match = null;
|
|
3858
|
+
while ((match = bareUrlRe.exec(line)) !== null) {
|
|
3859
|
+
exclusions.push([lineIndex, match.index, match[0].length]);
|
|
3247
3860
|
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3861
|
+
while ((match = linkRe.exec(line)) !== null) {
|
|
3862
|
+
var text = match[1], destination = match[2];
|
|
3863
|
+
if (destination) {
|
|
3864
|
+
exclusions.push([lineIndex, match.index + text.length, destination.length]);
|
|
3865
|
+
}
|
|
3250
3866
|
}
|
|
3251
|
-
}
|
|
3867
|
+
}
|
|
3252
3868
|
});
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
var
|
|
3258
|
-
var
|
|
3259
|
-
var
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
var matchLength = wordMatch.length;
|
|
3276
|
-
var matchIndex = fullLine.indexOf(wordMatch);
|
|
3277
|
-
var range = (matchIndex === -1) ?
|
|
3278
|
-
null :
|
|
3279
|
-
[matchIndex + 1, matchLength];
|
|
3280
|
-
var fixInfo = (matchIndex === -1) ?
|
|
3281
|
-
null :
|
|
3282
|
-
{
|
|
3283
|
-
"editColumn": matchIndex + 1,
|
|
3284
|
-
"deleteCount": matchLength,
|
|
3285
|
-
"insertText": name
|
|
3286
|
-
};
|
|
3287
|
-
addErrorDetailIf(onError, lineNumber, name, nameMatch, null, null, range, fixInfo);
|
|
3288
|
-
}
|
|
3289
|
-
}
|
|
3869
|
+
if (!includeCodeBlocks) {
|
|
3870
|
+
exclusions.push.apply(exclusions, inlineCodeSpanRanges());
|
|
3871
|
+
}
|
|
3872
|
+
var _loop_1 = function (name_1) {
|
|
3873
|
+
var escapedName = escapeForRegExp(name_1);
|
|
3874
|
+
var startNamePattern = /^\W/.test(name_1) ? "" : "\\b_*";
|
|
3875
|
+
var endNamePattern = /\W$/.test(name_1) ? "" : "_*\\b";
|
|
3876
|
+
var namePattern = "(" + startNamePattern + ")(" + escapedName + ")" + endNamePattern;
|
|
3877
|
+
var nameRe = new RegExp(namePattern, "gi");
|
|
3878
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
|
3879
|
+
if (includeCodeBlocks || (!inCode && !onFence)) {
|
|
3880
|
+
var match = null;
|
|
3881
|
+
while ((match = nameRe.exec(line)) !== null) {
|
|
3882
|
+
var leftMatch = match[1], nameMatch = match[2];
|
|
3883
|
+
var index = match.index + leftMatch.length;
|
|
3884
|
+
var length_1 = nameMatch.length;
|
|
3885
|
+
if (!overlapsAnyRange(exclusions, lineIndex, index, length_1)) {
|
|
3886
|
+
addErrorDetailIf(onError, lineIndex + 1, name_1, nameMatch, null, null, [index + 1, length_1], {
|
|
3887
|
+
"editColumn": index + 1,
|
|
3888
|
+
"deleteCount": length_1,
|
|
3889
|
+
"insertText": name_1
|
|
3890
|
+
});
|
|
3290
3891
|
}
|
|
3291
|
-
|
|
3892
|
+
exclusions.push([lineIndex, index, length_1]);
|
|
3893
|
+
}
|
|
3292
3894
|
}
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
}
|
|
3300
|
-
});
|
|
3895
|
+
});
|
|
3896
|
+
};
|
|
3897
|
+
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
|
|
3898
|
+
var name_1 = names_1[_i];
|
|
3899
|
+
_loop_1(name_1);
|
|
3900
|
+
}
|
|
3301
3901
|
}
|
|
3302
3902
|
};
|
|
3303
3903
|
|
|
3304
|
-
|
|
3305
|
-
|
|
3904
|
+
|
|
3905
|
+
/***/ }),
|
|
3906
|
+
|
|
3907
|
+
/***/ "../lib/md045.js":
|
|
3908
|
+
/*!***********************!*\
|
|
3909
|
+
!*** ../lib/md045.js ***!
|
|
3910
|
+
\***********************/
|
|
3911
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3912
|
+
|
|
3306
3913
|
"use strict";
|
|
3307
|
-
|
|
3914
|
+
// @ts-check
|
|
3915
|
+
|
|
3916
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachInlineChild = _a.forEachInlineChild;
|
|
3308
3917
|
module.exports = {
|
|
3309
3918
|
"names": ["MD045", "no-alt-text"],
|
|
3310
3919
|
"description": "Images should have alternate text (alt text)",
|
|
@@ -3318,10 +3927,19 @@ module.exports = {
|
|
|
3318
3927
|
}
|
|
3319
3928
|
};
|
|
3320
3929
|
|
|
3321
|
-
|
|
3322
|
-
|
|
3930
|
+
|
|
3931
|
+
/***/ }),
|
|
3932
|
+
|
|
3933
|
+
/***/ "../lib/md046.js":
|
|
3934
|
+
/*!***********************!*\
|
|
3935
|
+
!*** ../lib/md046.js ***!
|
|
3936
|
+
\***********************/
|
|
3937
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3938
|
+
|
|
3323
3939
|
"use strict";
|
|
3324
|
-
|
|
3940
|
+
// @ts-check
|
|
3941
|
+
|
|
3942
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
3325
3943
|
var tokenTypeToStyle = {
|
|
3326
3944
|
"fence": "fenced",
|
|
3327
3945
|
"code_block": "indented"
|
|
@@ -3344,10 +3962,19 @@ module.exports = {
|
|
|
3344
3962
|
}
|
|
3345
3963
|
};
|
|
3346
3964
|
|
|
3347
|
-
|
|
3348
|
-
|
|
3965
|
+
|
|
3966
|
+
/***/ }),
|
|
3967
|
+
|
|
3968
|
+
/***/ "../lib/md047.js":
|
|
3969
|
+
/*!***********************!*\
|
|
3970
|
+
!*** ../lib/md047.js ***!
|
|
3971
|
+
\***********************/
|
|
3972
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3973
|
+
|
|
3349
3974
|
"use strict";
|
|
3350
|
-
|
|
3975
|
+
// @ts-check
|
|
3976
|
+
|
|
3977
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, isBlankLine = _a.isBlankLine;
|
|
3351
3978
|
module.exports = {
|
|
3352
3979
|
"names": ["MD047", "single-trailing-newline"],
|
|
3353
3980
|
"description": "Files should end with a single newline character",
|
|
@@ -3364,10 +3991,19 @@ module.exports = {
|
|
|
3364
3991
|
}
|
|
3365
3992
|
};
|
|
3366
3993
|
|
|
3367
|
-
|
|
3368
|
-
|
|
3994
|
+
|
|
3995
|
+
/***/ }),
|
|
3996
|
+
|
|
3997
|
+
/***/ "../lib/md048.js":
|
|
3998
|
+
/*!***********************!*\
|
|
3999
|
+
!*** ../lib/md048.js ***!
|
|
4000
|
+
\***********************/
|
|
4001
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4002
|
+
|
|
3369
4003
|
"use strict";
|
|
3370
|
-
|
|
4004
|
+
// @ts-check
|
|
4005
|
+
|
|
4006
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, fencedCodeBlockStyleFor = _a.fencedCodeBlockStyleFor;
|
|
3371
4007
|
module.exports = {
|
|
3372
4008
|
"names": ["MD048", "code-fence-style"],
|
|
3373
4009
|
"description": "Code fence style",
|
|
@@ -3387,1307 +4023,179 @@ module.exports = {
|
|
|
3387
4023
|
}
|
|
3388
4024
|
};
|
|
3389
4025
|
|
|
3390
|
-
|
|
3391
|
-
|
|
4026
|
+
|
|
4027
|
+
/***/ }),
|
|
4028
|
+
|
|
4029
|
+
/***/ "../lib/rules.js":
|
|
4030
|
+
/*!***********************!*\
|
|
4031
|
+
!*** ../lib/rules.js ***!
|
|
4032
|
+
\***********************/
|
|
4033
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4034
|
+
|
|
3392
4035
|
"use strict";
|
|
3393
|
-
|
|
4036
|
+
// @ts-check
|
|
4037
|
+
|
|
4038
|
+
var packageJson = __webpack_require__(/*! ../package.json */ "../package.json");
|
|
3394
4039
|
var homepage = packageJson.homepage;
|
|
3395
4040
|
var version = packageJson.version;
|
|
3396
4041
|
var rules = [
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
4042
|
+
__webpack_require__(/*! ./md001 */ "../lib/md001.js"),
|
|
4043
|
+
__webpack_require__(/*! ./md002 */ "../lib/md002.js"),
|
|
4044
|
+
__webpack_require__(/*! ./md003 */ "../lib/md003.js"),
|
|
4045
|
+
__webpack_require__(/*! ./md004 */ "../lib/md004.js"),
|
|
4046
|
+
__webpack_require__(/*! ./md005 */ "../lib/md005.js"),
|
|
4047
|
+
__webpack_require__(/*! ./md006 */ "../lib/md006.js"),
|
|
4048
|
+
__webpack_require__(/*! ./md007 */ "../lib/md007.js"),
|
|
4049
|
+
__webpack_require__(/*! ./md009 */ "../lib/md009.js"),
|
|
4050
|
+
__webpack_require__(/*! ./md010 */ "../lib/md010.js"),
|
|
4051
|
+
__webpack_require__(/*! ./md011 */ "../lib/md011.js"),
|
|
4052
|
+
__webpack_require__(/*! ./md012 */ "../lib/md012.js"),
|
|
4053
|
+
__webpack_require__(/*! ./md013 */ "../lib/md013.js"),
|
|
4054
|
+
__webpack_require__(/*! ./md014 */ "../lib/md014.js"),
|
|
4055
|
+
__webpack_require__(/*! ./md018 */ "../lib/md018.js"),
|
|
4056
|
+
__webpack_require__(/*! ./md019 */ "../lib/md019.js"),
|
|
4057
|
+
__webpack_require__(/*! ./md020 */ "../lib/md020.js"),
|
|
4058
|
+
__webpack_require__(/*! ./md021 */ "../lib/md021.js"),
|
|
4059
|
+
__webpack_require__(/*! ./md022 */ "../lib/md022.js"),
|
|
4060
|
+
__webpack_require__(/*! ./md023 */ "../lib/md023.js"),
|
|
4061
|
+
__webpack_require__(/*! ./md024 */ "../lib/md024.js"),
|
|
4062
|
+
__webpack_require__(/*! ./md025 */ "../lib/md025.js"),
|
|
4063
|
+
__webpack_require__(/*! ./md026 */ "../lib/md026.js"),
|
|
4064
|
+
__webpack_require__(/*! ./md027 */ "../lib/md027.js"),
|
|
4065
|
+
__webpack_require__(/*! ./md028 */ "../lib/md028.js"),
|
|
4066
|
+
__webpack_require__(/*! ./md029 */ "../lib/md029.js"),
|
|
4067
|
+
__webpack_require__(/*! ./md030 */ "../lib/md030.js"),
|
|
4068
|
+
__webpack_require__(/*! ./md031 */ "../lib/md031.js"),
|
|
4069
|
+
__webpack_require__(/*! ./md032 */ "../lib/md032.js"),
|
|
4070
|
+
__webpack_require__(/*! ./md033 */ "../lib/md033.js"),
|
|
4071
|
+
__webpack_require__(/*! ./md034 */ "../lib/md034.js"),
|
|
4072
|
+
__webpack_require__(/*! ./md035 */ "../lib/md035.js"),
|
|
4073
|
+
__webpack_require__(/*! ./md036 */ "../lib/md036.js"),
|
|
4074
|
+
__webpack_require__(/*! ./md037 */ "../lib/md037.js"),
|
|
4075
|
+
__webpack_require__(/*! ./md038 */ "../lib/md038.js"),
|
|
4076
|
+
__webpack_require__(/*! ./md039 */ "../lib/md039.js"),
|
|
4077
|
+
__webpack_require__(/*! ./md040 */ "../lib/md040.js"),
|
|
4078
|
+
__webpack_require__(/*! ./md041 */ "../lib/md041.js"),
|
|
4079
|
+
__webpack_require__(/*! ./md042 */ "../lib/md042.js"),
|
|
4080
|
+
__webpack_require__(/*! ./md043 */ "../lib/md043.js"),
|
|
4081
|
+
__webpack_require__(/*! ./md044 */ "../lib/md044.js"),
|
|
4082
|
+
__webpack_require__(/*! ./md045 */ "../lib/md045.js"),
|
|
4083
|
+
__webpack_require__(/*! ./md046 */ "../lib/md046.js"),
|
|
4084
|
+
__webpack_require__(/*! ./md047 */ "../lib/md047.js"),
|
|
4085
|
+
__webpack_require__(/*! ./md048 */ "../lib/md048.js")
|
|
3441
4086
|
];
|
|
3442
4087
|
rules.forEach(function (rule) {
|
|
3443
4088
|
var name = rule.names[0].toLowerCase();
|
|
3444
|
-
|
|
4089
|
+
// eslint-disable-next-line dot-notation
|
|
4090
|
+
rule["information"] =
|
|
3445
4091
|
new URL(homepage + "/blob/v" + version + "/doc/Rules.md#" + name);
|
|
3446
4092
|
});
|
|
3447
4093
|
module.exports = rules;
|
|
3448
4094
|
|
|
3449
|
-
},{"../package.json":50,"./md001":5,"./md002":6,"./md003":7,"./md004":8,"./md005":9,"./md006":10,"./md007":11,"./md009":12,"./md010":13,"./md011":14,"./md012":15,"./md013":16,"./md014":17,"./md018":18,"./md019":19,"./md020":20,"./md021":21,"./md022":22,"./md023":23,"./md024":24,"./md025":25,"./md026":26,"./md027":27,"./md028":28,"./md029":29,"./md030":30,"./md031":31,"./md032":32,"./md033":33,"./md034":34,"./md035":35,"./md036":36,"./md037":37,"./md038":38,"./md039":39,"./md040":40,"./md041":41,"./md042":42,"./md043":43,"./md044":44,"./md045":45,"./md046":46,"./md047":47,"./md048":48}],50:[function(require,module,exports){
|
|
3450
|
-
module.exports={
|
|
3451
|
-
"name": "markdownlint",
|
|
3452
|
-
"version": "0.21.1",
|
|
3453
|
-
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
|
3454
|
-
"main": "lib/markdownlint.js",
|
|
3455
|
-
"types": "lib/markdownlint.d.ts",
|
|
3456
|
-
"author": "David Anson (https://dlaa.me/)",
|
|
3457
|
-
"license": "MIT",
|
|
3458
|
-
"homepage": "https://github.com/DavidAnson/markdownlint",
|
|
3459
|
-
"repository": {
|
|
3460
|
-
"type": "git",
|
|
3461
|
-
"url": "https://github.com/DavidAnson/markdownlint.git"
|
|
3462
|
-
},
|
|
3463
|
-
"bugs": "https://github.com/DavidAnson/markdownlint/issues",
|
|
3464
|
-
"scripts": {
|
|
3465
|
-
"test": "tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
|
3466
|
-
"test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
|
3467
|
-
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
|
3468
|
-
"test-extra": "node test/markdownlint-test-extra.js",
|
|
3469
|
-
"lint": "eslint --max-warnings 0 lib helpers test schema && eslint --env browser --global markdownit --global markdownlint --rule \"no-unused-vars: 0, no-extend-native: 0, max-statements: 0, no-console: 0, no-var: 0, unicorn/prefer-add-event-listener: 0, unicorn/prefer-query-selector: 0, unicorn/prefer-replace-all: 0\" demo && eslint --rule \"no-console: 0, no-invalid-this: 0, no-shadow: 0, object-property-newline: 0, node/no-missing-require: 0, node/no-extraneous-require: 0\" example",
|
|
3470
|
-
"ci": "npm run test-cover && npm run lint && npm run test-declaration",
|
|
3471
|
-
"build-config-schema": "node schema/build-config-schema.js",
|
|
3472
|
-
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
|
|
3473
|
-
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && cpy file-header.js . --rename=markdownlint-browser.js && tsc --allowJs --resolveJsonModule --outDir ../lib-es3 ../lib/markdownlint.js && cpy ../helpers/package.json ../lib-es3/helpers && browserify ../lib-es3/lib/markdownlint.js --standalone markdownlint >> markdownlint-browser.js && browserify ../lib-es3/helpers/helpers.js --standalone helpers >> markdownlint-rule-helpers-browser.js && uglifyjs markdownlint-browser.js markdownlint-rule-helpers-browser.js --compress --mangle --comments --output markdownlint-browser.min.js",
|
|
3474
|
-
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
|
3475
|
-
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
|
3476
|
-
"clone-test-repos": "make-dir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet",
|
|
3477
|
-
"clone-test-repos-large": "npm run clone-test-repos && cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet",
|
|
3478
|
-
"lint-test-repos": "node test/markdownlint-test-repos.js",
|
|
3479
|
-
"clean-test-repos": "rimraf test-repos"
|
|
3480
|
-
},
|
|
3481
|
-
"engines": {
|
|
3482
|
-
"node": ">=10"
|
|
3483
|
-
},
|
|
3484
|
-
"dependencies": {
|
|
3485
|
-
"markdown-it": "11.0.0"
|
|
3486
|
-
},
|
|
3487
|
-
"devDependencies": {
|
|
3488
|
-
"@types/node": "~14.6.4",
|
|
3489
|
-
"browserify": "~16.5.2",
|
|
3490
|
-
"c8": "~7.3.0",
|
|
3491
|
-
"cpy-cli": "~3.1.1",
|
|
3492
|
-
"eslint": "~7.8.1",
|
|
3493
|
-
"eslint-plugin-jsdoc": "~30.3.1",
|
|
3494
|
-
"eslint-plugin-node": "~11.1.0",
|
|
3495
|
-
"eslint-plugin-unicorn": "~21.0.0",
|
|
3496
|
-
"globby": "~11.0.1",
|
|
3497
|
-
"js-yaml": "~3.14.0",
|
|
3498
|
-
"make-dir-cli": "~2.0.0",
|
|
3499
|
-
"markdown-it-for-inline": "~0.1.1",
|
|
3500
|
-
"markdown-it-sub": "~1.0.0",
|
|
3501
|
-
"markdown-it-sup": "~1.0.0",
|
|
3502
|
-
"markdown-it-texmath": "~0.8.0",
|
|
3503
|
-
"markdownlint-rule-helpers": "~0.11.0",
|
|
3504
|
-
"rimraf": "~3.0.2",
|
|
3505
|
-
"strip-json-comments": "~3.1.1",
|
|
3506
|
-
"tape": "~5.0.1",
|
|
3507
|
-
"tape-player": "~0.1.1",
|
|
3508
|
-
"toml": "~3.0.0",
|
|
3509
|
-
"tv4": "~1.3.0",
|
|
3510
|
-
"typescript": "~4.0.2",
|
|
3511
|
-
"uglify-js": "~3.10.3"
|
|
3512
|
-
},
|
|
3513
|
-
"keywords": [
|
|
3514
|
-
"markdown",
|
|
3515
|
-
"lint",
|
|
3516
|
-
"md",
|
|
3517
|
-
"CommonMark",
|
|
3518
|
-
"markdownlint"
|
|
3519
|
-
],
|
|
3520
|
-
"browser": {
|
|
3521
|
-
"markdown-it": "../demo/markdown-it-stub.js"
|
|
3522
|
-
}
|
|
3523
|
-
}
|
|
3524
|
-
|
|
3525
|
-
},{}],51:[function(require,module,exports){
|
|
3526
|
-
|
|
3527
|
-
},{}],52:[function(require,module,exports){
|
|
3528
|
-
exports.endianness = function () { return 'LE' };
|
|
3529
|
-
|
|
3530
|
-
exports.hostname = function () {
|
|
3531
|
-
if (typeof location !== 'undefined') {
|
|
3532
|
-
return location.hostname
|
|
3533
|
-
}
|
|
3534
|
-
else return '';
|
|
3535
|
-
};
|
|
3536
|
-
|
|
3537
|
-
exports.loadavg = function () { return [] };
|
|
3538
|
-
|
|
3539
|
-
exports.uptime = function () { return 0 };
|
|
3540
|
-
|
|
3541
|
-
exports.freemem = function () {
|
|
3542
|
-
return Number.MAX_VALUE;
|
|
3543
|
-
};
|
|
3544
|
-
|
|
3545
|
-
exports.totalmem = function () {
|
|
3546
|
-
return Number.MAX_VALUE;
|
|
3547
|
-
};
|
|
3548
|
-
|
|
3549
|
-
exports.cpus = function () { return [] };
|
|
3550
|
-
|
|
3551
|
-
exports.type = function () { return 'Browser' };
|
|
3552
|
-
|
|
3553
|
-
exports.release = function () {
|
|
3554
|
-
if (typeof navigator !== 'undefined') {
|
|
3555
|
-
return navigator.appVersion;
|
|
3556
|
-
}
|
|
3557
|
-
return '';
|
|
3558
|
-
};
|
|
3559
|
-
|
|
3560
|
-
exports.networkInterfaces
|
|
3561
|
-
= exports.getNetworkInterfaces
|
|
3562
|
-
= function () { return {} };
|
|
3563
|
-
|
|
3564
|
-
exports.arch = function () { return 'javascript' };
|
|
3565
|
-
|
|
3566
|
-
exports.platform = function () { return 'browser' };
|
|
3567
|
-
|
|
3568
|
-
exports.tmpdir = exports.tmpDir = function () {
|
|
3569
|
-
return '/tmp';
|
|
3570
|
-
};
|
|
3571
|
-
|
|
3572
|
-
exports.EOL = '\n';
|
|
3573
|
-
|
|
3574
|
-
exports.homedir = function () {
|
|
3575
|
-
return '/'
|
|
3576
|
-
};
|
|
3577
|
-
|
|
3578
|
-
},{}],53:[function(require,module,exports){
|
|
3579
|
-
(function (process){(function (){
|
|
3580
|
-
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
|
|
3581
|
-
// backported and transplited with Babel, with backwards-compat fixes
|
|
3582
|
-
|
|
3583
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
3584
|
-
//
|
|
3585
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
3586
|
-
// copy of this software and associated documentation files (the
|
|
3587
|
-
// "Software"), to deal in the Software without restriction, including
|
|
3588
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
3589
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
3590
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
3591
|
-
// following conditions:
|
|
3592
|
-
//
|
|
3593
|
-
// The above copyright notice and this permission notice shall be included
|
|
3594
|
-
// in all copies or substantial portions of the Software.
|
|
3595
|
-
//
|
|
3596
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
3597
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
3598
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
3599
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
3600
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3601
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3602
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3603
|
-
|
|
3604
|
-
// resolves . and .. elements in a path array with directory names there
|
|
3605
|
-
// must be no slashes, empty elements, or device names (c:\) in the array
|
|
3606
|
-
// (so also no leading and trailing slashes - it does not distinguish
|
|
3607
|
-
// relative and absolute paths)
|
|
3608
|
-
function normalizeArray(parts, allowAboveRoot) {
|
|
3609
|
-
// if the path tries to go above the root, `up` ends up > 0
|
|
3610
|
-
var up = 0;
|
|
3611
|
-
for (var i = parts.length - 1; i >= 0; i--) {
|
|
3612
|
-
var last = parts[i];
|
|
3613
|
-
if (last === '.') {
|
|
3614
|
-
parts.splice(i, 1);
|
|
3615
|
-
} else if (last === '..') {
|
|
3616
|
-
parts.splice(i, 1);
|
|
3617
|
-
up++;
|
|
3618
|
-
} else if (up) {
|
|
3619
|
-
parts.splice(i, 1);
|
|
3620
|
-
up--;
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
|
|
3624
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
3625
|
-
if (allowAboveRoot) {
|
|
3626
|
-
for (; up--; up) {
|
|
3627
|
-
parts.unshift('..');
|
|
3628
|
-
}
|
|
3629
|
-
}
|
|
3630
|
-
|
|
3631
|
-
return parts;
|
|
3632
|
-
}
|
|
3633
|
-
|
|
3634
|
-
// path.resolve([from ...], to)
|
|
3635
|
-
// posix version
|
|
3636
|
-
exports.resolve = function() {
|
|
3637
|
-
var resolvedPath = '',
|
|
3638
|
-
resolvedAbsolute = false;
|
|
3639
|
-
|
|
3640
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
3641
|
-
var path = (i >= 0) ? arguments[i] : process.cwd();
|
|
3642
|
-
|
|
3643
|
-
// Skip empty and invalid entries
|
|
3644
|
-
if (typeof path !== 'string') {
|
|
3645
|
-
throw new TypeError('Arguments to path.resolve must be strings');
|
|
3646
|
-
} else if (!path) {
|
|
3647
|
-
continue;
|
|
3648
|
-
}
|
|
3649
|
-
|
|
3650
|
-
resolvedPath = path + '/' + resolvedPath;
|
|
3651
|
-
resolvedAbsolute = path.charAt(0) === '/';
|
|
3652
|
-
}
|
|
3653
|
-
|
|
3654
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
3655
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
3656
4095
|
|
|
3657
|
-
|
|
3658
|
-
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
|
|
3659
|
-
return !!p;
|
|
3660
|
-
}), !resolvedAbsolute).join('/');
|
|
3661
|
-
|
|
3662
|
-
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
|
3663
|
-
};
|
|
3664
|
-
|
|
3665
|
-
// path.normalize(path)
|
|
3666
|
-
// posix version
|
|
3667
|
-
exports.normalize = function(path) {
|
|
3668
|
-
var isAbsolute = exports.isAbsolute(path),
|
|
3669
|
-
trailingSlash = substr(path, -1) === '/';
|
|
3670
|
-
|
|
3671
|
-
// Normalize the path
|
|
3672
|
-
path = normalizeArray(filter(path.split('/'), function(p) {
|
|
3673
|
-
return !!p;
|
|
3674
|
-
}), !isAbsolute).join('/');
|
|
3675
|
-
|
|
3676
|
-
if (!path && !isAbsolute) {
|
|
3677
|
-
path = '.';
|
|
3678
|
-
}
|
|
3679
|
-
if (path && trailingSlash) {
|
|
3680
|
-
path += '/';
|
|
3681
|
-
}
|
|
3682
|
-
|
|
3683
|
-
return (isAbsolute ? '/' : '') + path;
|
|
3684
|
-
};
|
|
3685
|
-
|
|
3686
|
-
// posix version
|
|
3687
|
-
exports.isAbsolute = function(path) {
|
|
3688
|
-
return path.charAt(0) === '/';
|
|
3689
|
-
};
|
|
3690
|
-
|
|
3691
|
-
// posix version
|
|
3692
|
-
exports.join = function() {
|
|
3693
|
-
var paths = Array.prototype.slice.call(arguments, 0);
|
|
3694
|
-
return exports.normalize(filter(paths, function(p, index) {
|
|
3695
|
-
if (typeof p !== 'string') {
|
|
3696
|
-
throw new TypeError('Arguments to path.join must be strings');
|
|
3697
|
-
}
|
|
3698
|
-
return p;
|
|
3699
|
-
}).join('/'));
|
|
3700
|
-
};
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
// path.relative(from, to)
|
|
3704
|
-
// posix version
|
|
3705
|
-
exports.relative = function(from, to) {
|
|
3706
|
-
from = exports.resolve(from).substr(1);
|
|
3707
|
-
to = exports.resolve(to).substr(1);
|
|
3708
|
-
|
|
3709
|
-
function trim(arr) {
|
|
3710
|
-
var start = 0;
|
|
3711
|
-
for (; start < arr.length; start++) {
|
|
3712
|
-
if (arr[start] !== '') break;
|
|
3713
|
-
}
|
|
3714
|
-
|
|
3715
|
-
var end = arr.length - 1;
|
|
3716
|
-
for (; end >= 0; end--) {
|
|
3717
|
-
if (arr[end] !== '') break;
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
if (start > end) return [];
|
|
3721
|
-
return arr.slice(start, end - start + 1);
|
|
3722
|
-
}
|
|
3723
|
-
|
|
3724
|
-
var fromParts = trim(from.split('/'));
|
|
3725
|
-
var toParts = trim(to.split('/'));
|
|
3726
|
-
|
|
3727
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
3728
|
-
var samePartsLength = length;
|
|
3729
|
-
for (var i = 0; i < length; i++) {
|
|
3730
|
-
if (fromParts[i] !== toParts[i]) {
|
|
3731
|
-
samePartsLength = i;
|
|
3732
|
-
break;
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
|
-
|
|
3736
|
-
var outputParts = [];
|
|
3737
|
-
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
3738
|
-
outputParts.push('..');
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
3742
|
-
|
|
3743
|
-
return outputParts.join('/');
|
|
3744
|
-
};
|
|
3745
|
-
|
|
3746
|
-
exports.sep = '/';
|
|
3747
|
-
exports.delimiter = ':';
|
|
3748
|
-
|
|
3749
|
-
exports.dirname = function (path) {
|
|
3750
|
-
if (typeof path !== 'string') path = path + '';
|
|
3751
|
-
if (path.length === 0) return '.';
|
|
3752
|
-
var code = path.charCodeAt(0);
|
|
3753
|
-
var hasRoot = code === 47 /*/*/;
|
|
3754
|
-
var end = -1;
|
|
3755
|
-
var matchedSlash = true;
|
|
3756
|
-
for (var i = path.length - 1; i >= 1; --i) {
|
|
3757
|
-
code = path.charCodeAt(i);
|
|
3758
|
-
if (code === 47 /*/*/) {
|
|
3759
|
-
if (!matchedSlash) {
|
|
3760
|
-
end = i;
|
|
3761
|
-
break;
|
|
3762
|
-
}
|
|
3763
|
-
} else {
|
|
3764
|
-
// We saw the first non-path separator
|
|
3765
|
-
matchedSlash = false;
|
|
3766
|
-
}
|
|
3767
|
-
}
|
|
3768
|
-
|
|
3769
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
3770
|
-
if (hasRoot && end === 1) {
|
|
3771
|
-
// return '//';
|
|
3772
|
-
// Backwards-compat fix:
|
|
3773
|
-
return '/';
|
|
3774
|
-
}
|
|
3775
|
-
return path.slice(0, end);
|
|
3776
|
-
};
|
|
3777
|
-
|
|
3778
|
-
function basename(path) {
|
|
3779
|
-
if (typeof path !== 'string') path = path + '';
|
|
3780
|
-
|
|
3781
|
-
var start = 0;
|
|
3782
|
-
var end = -1;
|
|
3783
|
-
var matchedSlash = true;
|
|
3784
|
-
var i;
|
|
3785
|
-
|
|
3786
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
3787
|
-
if (path.charCodeAt(i) === 47 /*/*/) {
|
|
3788
|
-
// If we reached a path separator that was not part of a set of path
|
|
3789
|
-
// separators at the end of the string, stop now
|
|
3790
|
-
if (!matchedSlash) {
|
|
3791
|
-
start = i + 1;
|
|
3792
|
-
break;
|
|
3793
|
-
}
|
|
3794
|
-
} else if (end === -1) {
|
|
3795
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
3796
|
-
// path component
|
|
3797
|
-
matchedSlash = false;
|
|
3798
|
-
end = i + 1;
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
|
|
3802
|
-
if (end === -1) return '';
|
|
3803
|
-
return path.slice(start, end);
|
|
3804
|
-
}
|
|
3805
|
-
|
|
3806
|
-
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
|
|
3807
|
-
// in new Node.js versions, so only basename() above is backported here
|
|
3808
|
-
exports.basename = function (path, ext) {
|
|
3809
|
-
var f = basename(path);
|
|
3810
|
-
if (ext && f.substr(-1 * ext.length) === ext) {
|
|
3811
|
-
f = f.substr(0, f.length - ext.length);
|
|
3812
|
-
}
|
|
3813
|
-
return f;
|
|
3814
|
-
};
|
|
3815
|
-
|
|
3816
|
-
exports.extname = function (path) {
|
|
3817
|
-
if (typeof path !== 'string') path = path + '';
|
|
3818
|
-
var startDot = -1;
|
|
3819
|
-
var startPart = 0;
|
|
3820
|
-
var end = -1;
|
|
3821
|
-
var matchedSlash = true;
|
|
3822
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
3823
|
-
// after any path separator we find
|
|
3824
|
-
var preDotState = 0;
|
|
3825
|
-
for (var i = path.length - 1; i >= 0; --i) {
|
|
3826
|
-
var code = path.charCodeAt(i);
|
|
3827
|
-
if (code === 47 /*/*/) {
|
|
3828
|
-
// If we reached a path separator that was not part of a set of path
|
|
3829
|
-
// separators at the end of the string, stop now
|
|
3830
|
-
if (!matchedSlash) {
|
|
3831
|
-
startPart = i + 1;
|
|
3832
|
-
break;
|
|
3833
|
-
}
|
|
3834
|
-
continue;
|
|
3835
|
-
}
|
|
3836
|
-
if (end === -1) {
|
|
3837
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
3838
|
-
// extension
|
|
3839
|
-
matchedSlash = false;
|
|
3840
|
-
end = i + 1;
|
|
3841
|
-
}
|
|
3842
|
-
if (code === 46 /*.*/) {
|
|
3843
|
-
// If this is our first dot, mark it as the start of our extension
|
|
3844
|
-
if (startDot === -1)
|
|
3845
|
-
startDot = i;
|
|
3846
|
-
else if (preDotState !== 1)
|
|
3847
|
-
preDotState = 1;
|
|
3848
|
-
} else if (startDot !== -1) {
|
|
3849
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
3850
|
-
// have a good chance at having a non-empty extension
|
|
3851
|
-
preDotState = -1;
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3855
|
-
if (startDot === -1 || end === -1 ||
|
|
3856
|
-
// We saw a non-dot character immediately before the dot
|
|
3857
|
-
preDotState === 0 ||
|
|
3858
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
3859
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
3860
|
-
return '';
|
|
3861
|
-
}
|
|
3862
|
-
return path.slice(startDot, end);
|
|
3863
|
-
};
|
|
3864
|
-
|
|
3865
|
-
function filter (xs, f) {
|
|
3866
|
-
if (xs.filter) return xs.filter(f);
|
|
3867
|
-
var res = [];
|
|
3868
|
-
for (var i = 0; i < xs.length; i++) {
|
|
3869
|
-
if (f(xs[i], i, xs)) res.push(xs[i]);
|
|
3870
|
-
}
|
|
3871
|
-
return res;
|
|
3872
|
-
}
|
|
3873
|
-
|
|
3874
|
-
// String.prototype.substr - negative index don't work in IE8
|
|
3875
|
-
var substr = 'ab'.substr(-1) === 'b'
|
|
3876
|
-
? function (str, start, len) { return str.substr(start, len) }
|
|
3877
|
-
: function (str, start, len) {
|
|
3878
|
-
if (start < 0) start = str.length + start;
|
|
3879
|
-
return str.substr(start, len);
|
|
3880
|
-
}
|
|
3881
|
-
;
|
|
3882
|
-
|
|
3883
|
-
}).call(this)}).call(this,require('_process'))
|
|
3884
|
-
},{"_process":54}],54:[function(require,module,exports){
|
|
3885
|
-
// shim for using process in browser
|
|
3886
|
-
var process = module.exports = {};
|
|
3887
|
-
|
|
3888
|
-
// cached from whatever global is present so that test runners that stub it
|
|
3889
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
3890
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
3891
|
-
// function because try/catches deoptimize in certain engines.
|
|
3892
|
-
|
|
3893
|
-
var cachedSetTimeout;
|
|
3894
|
-
var cachedClearTimeout;
|
|
3895
|
-
|
|
3896
|
-
function defaultSetTimout() {
|
|
3897
|
-
throw new Error('setTimeout has not been defined');
|
|
3898
|
-
}
|
|
3899
|
-
function defaultClearTimeout () {
|
|
3900
|
-
throw new Error('clearTimeout has not been defined');
|
|
3901
|
-
}
|
|
3902
|
-
(function () {
|
|
3903
|
-
try {
|
|
3904
|
-
if (typeof setTimeout === 'function') {
|
|
3905
|
-
cachedSetTimeout = setTimeout;
|
|
3906
|
-
} else {
|
|
3907
|
-
cachedSetTimeout = defaultSetTimout;
|
|
3908
|
-
}
|
|
3909
|
-
} catch (e) {
|
|
3910
|
-
cachedSetTimeout = defaultSetTimout;
|
|
3911
|
-
}
|
|
3912
|
-
try {
|
|
3913
|
-
if (typeof clearTimeout === 'function') {
|
|
3914
|
-
cachedClearTimeout = clearTimeout;
|
|
3915
|
-
} else {
|
|
3916
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
3917
|
-
}
|
|
3918
|
-
} catch (e) {
|
|
3919
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
3920
|
-
}
|
|
3921
|
-
} ())
|
|
3922
|
-
function runTimeout(fun) {
|
|
3923
|
-
if (cachedSetTimeout === setTimeout) {
|
|
3924
|
-
//normal enviroments in sane situations
|
|
3925
|
-
return setTimeout(fun, 0);
|
|
3926
|
-
}
|
|
3927
|
-
// if setTimeout wasn't available but was latter defined
|
|
3928
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
3929
|
-
cachedSetTimeout = setTimeout;
|
|
3930
|
-
return setTimeout(fun, 0);
|
|
3931
|
-
}
|
|
3932
|
-
try {
|
|
3933
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
3934
|
-
return cachedSetTimeout(fun, 0);
|
|
3935
|
-
} catch(e){
|
|
3936
|
-
try {
|
|
3937
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
3938
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
3939
|
-
} catch(e){
|
|
3940
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
3941
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
3942
|
-
}
|
|
3943
|
-
}
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
}
|
|
3947
|
-
function runClearTimeout(marker) {
|
|
3948
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
3949
|
-
//normal enviroments in sane situations
|
|
3950
|
-
return clearTimeout(marker);
|
|
3951
|
-
}
|
|
3952
|
-
// if clearTimeout wasn't available but was latter defined
|
|
3953
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
3954
|
-
cachedClearTimeout = clearTimeout;
|
|
3955
|
-
return clearTimeout(marker);
|
|
3956
|
-
}
|
|
3957
|
-
try {
|
|
3958
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
3959
|
-
return cachedClearTimeout(marker);
|
|
3960
|
-
} catch (e){
|
|
3961
|
-
try {
|
|
3962
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
3963
|
-
return cachedClearTimeout.call(null, marker);
|
|
3964
|
-
} catch (e){
|
|
3965
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
3966
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
3967
|
-
return cachedClearTimeout.call(this, marker);
|
|
3968
|
-
}
|
|
3969
|
-
}
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
}
|
|
3974
|
-
var queue = [];
|
|
3975
|
-
var draining = false;
|
|
3976
|
-
var currentQueue;
|
|
3977
|
-
var queueIndex = -1;
|
|
3978
|
-
|
|
3979
|
-
function cleanUpNextTick() {
|
|
3980
|
-
if (!draining || !currentQueue) {
|
|
3981
|
-
return;
|
|
3982
|
-
}
|
|
3983
|
-
draining = false;
|
|
3984
|
-
if (currentQueue.length) {
|
|
3985
|
-
queue = currentQueue.concat(queue);
|
|
3986
|
-
} else {
|
|
3987
|
-
queueIndex = -1;
|
|
3988
|
-
}
|
|
3989
|
-
if (queue.length) {
|
|
3990
|
-
drainQueue();
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3993
|
-
|
|
3994
|
-
function drainQueue() {
|
|
3995
|
-
if (draining) {
|
|
3996
|
-
return;
|
|
3997
|
-
}
|
|
3998
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
3999
|
-
draining = true;
|
|
4000
|
-
|
|
4001
|
-
var len = queue.length;
|
|
4002
|
-
while(len) {
|
|
4003
|
-
currentQueue = queue;
|
|
4004
|
-
queue = [];
|
|
4005
|
-
while (++queueIndex < len) {
|
|
4006
|
-
if (currentQueue) {
|
|
4007
|
-
currentQueue[queueIndex].run();
|
|
4008
|
-
}
|
|
4009
|
-
}
|
|
4010
|
-
queueIndex = -1;
|
|
4011
|
-
len = queue.length;
|
|
4012
|
-
}
|
|
4013
|
-
currentQueue = null;
|
|
4014
|
-
draining = false;
|
|
4015
|
-
runClearTimeout(timeout);
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
process.nextTick = function (fun) {
|
|
4019
|
-
var args = new Array(arguments.length - 1);
|
|
4020
|
-
if (arguments.length > 1) {
|
|
4021
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4022
|
-
args[i - 1] = arguments[i];
|
|
4023
|
-
}
|
|
4024
|
-
}
|
|
4025
|
-
queue.push(new Item(fun, args));
|
|
4026
|
-
if (queue.length === 1 && !draining) {
|
|
4027
|
-
runTimeout(drainQueue);
|
|
4028
|
-
}
|
|
4029
|
-
};
|
|
4030
|
-
|
|
4031
|
-
// v8 likes predictible objects
|
|
4032
|
-
function Item(fun, array) {
|
|
4033
|
-
this.fun = fun;
|
|
4034
|
-
this.array = array;
|
|
4035
|
-
}
|
|
4036
|
-
Item.prototype.run = function () {
|
|
4037
|
-
this.fun.apply(null, this.array);
|
|
4038
|
-
};
|
|
4039
|
-
process.title = 'browser';
|
|
4040
|
-
process.browser = true;
|
|
4041
|
-
process.env = {};
|
|
4042
|
-
process.argv = [];
|
|
4043
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
4044
|
-
process.versions = {};
|
|
4045
|
-
|
|
4046
|
-
function noop() {}
|
|
4047
|
-
|
|
4048
|
-
process.on = noop;
|
|
4049
|
-
process.addListener = noop;
|
|
4050
|
-
process.once = noop;
|
|
4051
|
-
process.off = noop;
|
|
4052
|
-
process.removeListener = noop;
|
|
4053
|
-
process.removeAllListeners = noop;
|
|
4054
|
-
process.emit = noop;
|
|
4055
|
-
process.prependListener = noop;
|
|
4056
|
-
process.prependOnceListener = noop;
|
|
4057
|
-
|
|
4058
|
-
process.listeners = function (name) { return [] }
|
|
4059
|
-
|
|
4060
|
-
process.binding = function (name) {
|
|
4061
|
-
throw new Error('process.binding is not supported');
|
|
4062
|
-
};
|
|
4063
|
-
|
|
4064
|
-
process.cwd = function () { return '/' };
|
|
4065
|
-
process.chdir = function (dir) {
|
|
4066
|
-
throw new Error('process.chdir is not supported');
|
|
4067
|
-
};
|
|
4068
|
-
process.umask = function() { return 0; };
|
|
4069
|
-
|
|
4070
|
-
},{}],55:[function(require,module,exports){
|
|
4071
|
-
if (typeof Object.create === 'function') {
|
|
4072
|
-
// implementation from standard node.js 'util' module
|
|
4073
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
4074
|
-
ctor.super_ = superCtor
|
|
4075
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
4076
|
-
constructor: {
|
|
4077
|
-
value: ctor,
|
|
4078
|
-
enumerable: false,
|
|
4079
|
-
writable: true,
|
|
4080
|
-
configurable: true
|
|
4081
|
-
}
|
|
4082
|
-
});
|
|
4083
|
-
};
|
|
4084
|
-
} else {
|
|
4085
|
-
// old school shim for old browsers
|
|
4086
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
4087
|
-
ctor.super_ = superCtor
|
|
4088
|
-
var TempCtor = function () {}
|
|
4089
|
-
TempCtor.prototype = superCtor.prototype
|
|
4090
|
-
ctor.prototype = new TempCtor()
|
|
4091
|
-
ctor.prototype.constructor = ctor
|
|
4092
|
-
}
|
|
4093
|
-
}
|
|
4094
|
-
|
|
4095
|
-
},{}],56:[function(require,module,exports){
|
|
4096
|
-
module.exports = function isBuffer(arg) {
|
|
4097
|
-
return arg && typeof arg === 'object'
|
|
4098
|
-
&& typeof arg.copy === 'function'
|
|
4099
|
-
&& typeof arg.fill === 'function'
|
|
4100
|
-
&& typeof arg.readUInt8 === 'function';
|
|
4101
|
-
}
|
|
4102
|
-
},{}],57:[function(require,module,exports){
|
|
4103
|
-
(function (process,global){(function (){
|
|
4104
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
4105
|
-
//
|
|
4106
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4107
|
-
// copy of this software and associated documentation files (the
|
|
4108
|
-
// "Software"), to deal in the Software without restriction, including
|
|
4109
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
4110
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
4111
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
4112
|
-
// following conditions:
|
|
4113
|
-
//
|
|
4114
|
-
// The above copyright notice and this permission notice shall be included
|
|
4115
|
-
// in all copies or substantial portions of the Software.
|
|
4116
|
-
//
|
|
4117
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
4118
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
4119
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
4120
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
4121
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
4122
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
4123
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
4124
|
-
|
|
4125
|
-
var formatRegExp = /%[sdj%]/g;
|
|
4126
|
-
exports.format = function(f) {
|
|
4127
|
-
if (!isString(f)) {
|
|
4128
|
-
var objects = [];
|
|
4129
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
4130
|
-
objects.push(inspect(arguments[i]));
|
|
4131
|
-
}
|
|
4132
|
-
return objects.join(' ');
|
|
4133
|
-
}
|
|
4134
|
-
|
|
4135
|
-
var i = 1;
|
|
4136
|
-
var args = arguments;
|
|
4137
|
-
var len = args.length;
|
|
4138
|
-
var str = String(f).replace(formatRegExp, function(x) {
|
|
4139
|
-
if (x === '%%') return '%';
|
|
4140
|
-
if (i >= len) return x;
|
|
4141
|
-
switch (x) {
|
|
4142
|
-
case '%s': return String(args[i++]);
|
|
4143
|
-
case '%d': return Number(args[i++]);
|
|
4144
|
-
case '%j':
|
|
4145
|
-
try {
|
|
4146
|
-
return JSON.stringify(args[i++]);
|
|
4147
|
-
} catch (_) {
|
|
4148
|
-
return '[Circular]';
|
|
4149
|
-
}
|
|
4150
|
-
default:
|
|
4151
|
-
return x;
|
|
4152
|
-
}
|
|
4153
|
-
});
|
|
4154
|
-
for (var x = args[i]; i < len; x = args[++i]) {
|
|
4155
|
-
if (isNull(x) || !isObject(x)) {
|
|
4156
|
-
str += ' ' + x;
|
|
4157
|
-
} else {
|
|
4158
|
-
str += ' ' + inspect(x);
|
|
4159
|
-
}
|
|
4160
|
-
}
|
|
4161
|
-
return str;
|
|
4162
|
-
};
|
|
4096
|
+
/***/ }),
|
|
4163
4097
|
|
|
4098
|
+
/***/ "markdown-it":
|
|
4099
|
+
/*!*****************************!*\
|
|
4100
|
+
!*** external "markdownit" ***!
|
|
4101
|
+
\*****************************/
|
|
4102
|
+
/***/ ((module) => {
|
|
4164
4103
|
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
// If --no-deprecation is set, then it is a no-op.
|
|
4168
|
-
exports.deprecate = function(fn, msg) {
|
|
4169
|
-
// Allow for deprecating things in the process of starting up.
|
|
4170
|
-
if (isUndefined(global.process)) {
|
|
4171
|
-
return function() {
|
|
4172
|
-
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
4173
|
-
};
|
|
4174
|
-
}
|
|
4175
|
-
|
|
4176
|
-
if (process.noDeprecation === true) {
|
|
4177
|
-
return fn;
|
|
4178
|
-
}
|
|
4179
|
-
|
|
4180
|
-
var warned = false;
|
|
4181
|
-
function deprecated() {
|
|
4182
|
-
if (!warned) {
|
|
4183
|
-
if (process.throwDeprecation) {
|
|
4184
|
-
throw new Error(msg);
|
|
4185
|
-
} else if (process.traceDeprecation) {
|
|
4186
|
-
console.trace(msg);
|
|
4187
|
-
} else {
|
|
4188
|
-
console.error(msg);
|
|
4189
|
-
}
|
|
4190
|
-
warned = true;
|
|
4191
|
-
}
|
|
4192
|
-
return fn.apply(this, arguments);
|
|
4193
|
-
}
|
|
4194
|
-
|
|
4195
|
-
return deprecated;
|
|
4196
|
-
};
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
var debugs = {};
|
|
4200
|
-
var debugEnviron;
|
|
4201
|
-
exports.debuglog = function(set) {
|
|
4202
|
-
if (isUndefined(debugEnviron))
|
|
4203
|
-
debugEnviron = process.env.NODE_DEBUG || '';
|
|
4204
|
-
set = set.toUpperCase();
|
|
4205
|
-
if (!debugs[set]) {
|
|
4206
|
-
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
|
4207
|
-
var pid = process.pid;
|
|
4208
|
-
debugs[set] = function() {
|
|
4209
|
-
var msg = exports.format.apply(exports, arguments);
|
|
4210
|
-
console.error('%s %d: %s', set, pid, msg);
|
|
4211
|
-
};
|
|
4212
|
-
} else {
|
|
4213
|
-
debugs[set] = function() {};
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
return debugs[set];
|
|
4217
|
-
};
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
/**
|
|
4221
|
-
* Echos the value of a value. Trys to print the value out
|
|
4222
|
-
* in the best way possible given the different types.
|
|
4223
|
-
*
|
|
4224
|
-
* @param {Object} obj The object to print out.
|
|
4225
|
-
* @param {Object} opts Optional options object that alters the output.
|
|
4226
|
-
*/
|
|
4227
|
-
/* legacy: obj, showHidden, depth, colors*/
|
|
4228
|
-
function inspect(obj, opts) {
|
|
4229
|
-
// default options
|
|
4230
|
-
var ctx = {
|
|
4231
|
-
seen: [],
|
|
4232
|
-
stylize: stylizeNoColor
|
|
4233
|
-
};
|
|
4234
|
-
// legacy...
|
|
4235
|
-
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
4236
|
-
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
4237
|
-
if (isBoolean(opts)) {
|
|
4238
|
-
// legacy...
|
|
4239
|
-
ctx.showHidden = opts;
|
|
4240
|
-
} else if (opts) {
|
|
4241
|
-
// got an "options" object
|
|
4242
|
-
exports._extend(ctx, opts);
|
|
4243
|
-
}
|
|
4244
|
-
// set default options
|
|
4245
|
-
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
4246
|
-
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
4247
|
-
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
4248
|
-
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
4249
|
-
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
4250
|
-
return formatValue(ctx, obj, ctx.depth);
|
|
4251
|
-
}
|
|
4252
|
-
exports.inspect = inspect;
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
4256
|
-
inspect.colors = {
|
|
4257
|
-
'bold' : [1, 22],
|
|
4258
|
-
'italic' : [3, 23],
|
|
4259
|
-
'underline' : [4, 24],
|
|
4260
|
-
'inverse' : [7, 27],
|
|
4261
|
-
'white' : [37, 39],
|
|
4262
|
-
'grey' : [90, 39],
|
|
4263
|
-
'black' : [30, 39],
|
|
4264
|
-
'blue' : [34, 39],
|
|
4265
|
-
'cyan' : [36, 39],
|
|
4266
|
-
'green' : [32, 39],
|
|
4267
|
-
'magenta' : [35, 39],
|
|
4268
|
-
'red' : [31, 39],
|
|
4269
|
-
'yellow' : [33, 39]
|
|
4270
|
-
};
|
|
4271
|
-
|
|
4272
|
-
// Don't use 'blue' not visible on cmd.exe
|
|
4273
|
-
inspect.styles = {
|
|
4274
|
-
'special': 'cyan',
|
|
4275
|
-
'number': 'yellow',
|
|
4276
|
-
'boolean': 'yellow',
|
|
4277
|
-
'undefined': 'grey',
|
|
4278
|
-
'null': 'bold',
|
|
4279
|
-
'string': 'green',
|
|
4280
|
-
'date': 'magenta',
|
|
4281
|
-
// "name": intentionally not styling
|
|
4282
|
-
'regexp': 'red'
|
|
4283
|
-
};
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
function stylizeWithColor(str, styleType) {
|
|
4287
|
-
var style = inspect.styles[styleType];
|
|
4288
|
-
|
|
4289
|
-
if (style) {
|
|
4290
|
-
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
4291
|
-
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
4292
|
-
} else {
|
|
4293
|
-
return str;
|
|
4294
|
-
}
|
|
4295
|
-
}
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
function stylizeNoColor(str, styleType) {
|
|
4299
|
-
return str;
|
|
4300
|
-
}
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
function arrayToHash(array) {
|
|
4304
|
-
var hash = {};
|
|
4305
|
-
|
|
4306
|
-
array.forEach(function(val, idx) {
|
|
4307
|
-
hash[val] = true;
|
|
4308
|
-
});
|
|
4309
|
-
|
|
4310
|
-
return hash;
|
|
4311
|
-
}
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
function formatValue(ctx, value, recurseTimes) {
|
|
4315
|
-
// Provide a hook for user-specified inspect functions.
|
|
4316
|
-
// Check that value is an object with an inspect function on it
|
|
4317
|
-
if (ctx.customInspect &&
|
|
4318
|
-
value &&
|
|
4319
|
-
isFunction(value.inspect) &&
|
|
4320
|
-
// Filter out the util module, it's inspect function is special
|
|
4321
|
-
value.inspect !== exports.inspect &&
|
|
4322
|
-
// Also filter out any prototype objects using the circular check.
|
|
4323
|
-
!(value.constructor && value.constructor.prototype === value)) {
|
|
4324
|
-
var ret = value.inspect(recurseTimes, ctx);
|
|
4325
|
-
if (!isString(ret)) {
|
|
4326
|
-
ret = formatValue(ctx, ret, recurseTimes);
|
|
4327
|
-
}
|
|
4328
|
-
return ret;
|
|
4329
|
-
}
|
|
4330
|
-
|
|
4331
|
-
// Primitive types cannot have properties
|
|
4332
|
-
var primitive = formatPrimitive(ctx, value);
|
|
4333
|
-
if (primitive) {
|
|
4334
|
-
return primitive;
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
// Look up the keys of the object.
|
|
4338
|
-
var keys = Object.keys(value);
|
|
4339
|
-
var visibleKeys = arrayToHash(keys);
|
|
4340
|
-
|
|
4341
|
-
if (ctx.showHidden) {
|
|
4342
|
-
keys = Object.getOwnPropertyNames(value);
|
|
4343
|
-
}
|
|
4344
|
-
|
|
4345
|
-
// IE doesn't make error fields non-enumerable
|
|
4346
|
-
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
4347
|
-
if (isError(value)
|
|
4348
|
-
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
4349
|
-
return formatError(value);
|
|
4350
|
-
}
|
|
4351
|
-
|
|
4352
|
-
// Some type of object without properties can be shortcutted.
|
|
4353
|
-
if (keys.length === 0) {
|
|
4354
|
-
if (isFunction(value)) {
|
|
4355
|
-
var name = value.name ? ': ' + value.name : '';
|
|
4356
|
-
return ctx.stylize('[Function' + name + ']', 'special');
|
|
4357
|
-
}
|
|
4358
|
-
if (isRegExp(value)) {
|
|
4359
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4360
|
-
}
|
|
4361
|
-
if (isDate(value)) {
|
|
4362
|
-
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
4363
|
-
}
|
|
4364
|
-
if (isError(value)) {
|
|
4365
|
-
return formatError(value);
|
|
4366
|
-
}
|
|
4367
|
-
}
|
|
4368
|
-
|
|
4369
|
-
var base = '', array = false, braces = ['{', '}'];
|
|
4370
|
-
|
|
4371
|
-
// Make Array say that they are Array
|
|
4372
|
-
if (isArray(value)) {
|
|
4373
|
-
array = true;
|
|
4374
|
-
braces = ['[', ']'];
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
// Make functions say that they are functions
|
|
4378
|
-
if (isFunction(value)) {
|
|
4379
|
-
var n = value.name ? ': ' + value.name : '';
|
|
4380
|
-
base = ' [Function' + n + ']';
|
|
4381
|
-
}
|
|
4382
|
-
|
|
4383
|
-
// Make RegExps say that they are RegExps
|
|
4384
|
-
if (isRegExp(value)) {
|
|
4385
|
-
base = ' ' + RegExp.prototype.toString.call(value);
|
|
4386
|
-
}
|
|
4387
|
-
|
|
4388
|
-
// Make dates with properties first say the date
|
|
4389
|
-
if (isDate(value)) {
|
|
4390
|
-
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
4391
|
-
}
|
|
4392
|
-
|
|
4393
|
-
// Make error with message first say the error
|
|
4394
|
-
if (isError(value)) {
|
|
4395
|
-
base = ' ' + formatError(value);
|
|
4396
|
-
}
|
|
4397
|
-
|
|
4398
|
-
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
4399
|
-
return braces[0] + base + braces[1];
|
|
4400
|
-
}
|
|
4401
|
-
|
|
4402
|
-
if (recurseTimes < 0) {
|
|
4403
|
-
if (isRegExp(value)) {
|
|
4404
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4405
|
-
} else {
|
|
4406
|
-
return ctx.stylize('[Object]', 'special');
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4409
|
-
|
|
4410
|
-
ctx.seen.push(value);
|
|
4411
|
-
|
|
4412
|
-
var output;
|
|
4413
|
-
if (array) {
|
|
4414
|
-
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
4415
|
-
} else {
|
|
4416
|
-
output = keys.map(function(key) {
|
|
4417
|
-
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
4418
|
-
});
|
|
4419
|
-
}
|
|
4420
|
-
|
|
4421
|
-
ctx.seen.pop();
|
|
4422
|
-
|
|
4423
|
-
return reduceToSingleString(output, base, braces);
|
|
4424
|
-
}
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
function formatPrimitive(ctx, value) {
|
|
4428
|
-
if (isUndefined(value))
|
|
4429
|
-
return ctx.stylize('undefined', 'undefined');
|
|
4430
|
-
if (isString(value)) {
|
|
4431
|
-
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
4432
|
-
.replace(/'/g, "\\'")
|
|
4433
|
-
.replace(/\\"/g, '"') + '\'';
|
|
4434
|
-
return ctx.stylize(simple, 'string');
|
|
4435
|
-
}
|
|
4436
|
-
if (isNumber(value))
|
|
4437
|
-
return ctx.stylize('' + value, 'number');
|
|
4438
|
-
if (isBoolean(value))
|
|
4439
|
-
return ctx.stylize('' + value, 'boolean');
|
|
4440
|
-
// For some reason typeof null is "object", so special case here.
|
|
4441
|
-
if (isNull(value))
|
|
4442
|
-
return ctx.stylize('null', 'null');
|
|
4443
|
-
}
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
function formatError(value) {
|
|
4447
|
-
return '[' + Error.prototype.toString.call(value) + ']';
|
|
4448
|
-
}
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
4452
|
-
var output = [];
|
|
4453
|
-
for (var i = 0, l = value.length; i < l; ++i) {
|
|
4454
|
-
if (hasOwnProperty(value, String(i))) {
|
|
4455
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4456
|
-
String(i), true));
|
|
4457
|
-
} else {
|
|
4458
|
-
output.push('');
|
|
4459
|
-
}
|
|
4460
|
-
}
|
|
4461
|
-
keys.forEach(function(key) {
|
|
4462
|
-
if (!key.match(/^\d+$/)) {
|
|
4463
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4464
|
-
key, true));
|
|
4465
|
-
}
|
|
4466
|
-
});
|
|
4467
|
-
return output;
|
|
4468
|
-
}
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
4472
|
-
var name, str, desc;
|
|
4473
|
-
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
4474
|
-
if (desc.get) {
|
|
4475
|
-
if (desc.set) {
|
|
4476
|
-
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
4477
|
-
} else {
|
|
4478
|
-
str = ctx.stylize('[Getter]', 'special');
|
|
4479
|
-
}
|
|
4480
|
-
} else {
|
|
4481
|
-
if (desc.set) {
|
|
4482
|
-
str = ctx.stylize('[Setter]', 'special');
|
|
4483
|
-
}
|
|
4484
|
-
}
|
|
4485
|
-
if (!hasOwnProperty(visibleKeys, key)) {
|
|
4486
|
-
name = '[' + key + ']';
|
|
4487
|
-
}
|
|
4488
|
-
if (!str) {
|
|
4489
|
-
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
4490
|
-
if (isNull(recurseTimes)) {
|
|
4491
|
-
str = formatValue(ctx, desc.value, null);
|
|
4492
|
-
} else {
|
|
4493
|
-
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
4494
|
-
}
|
|
4495
|
-
if (str.indexOf('\n') > -1) {
|
|
4496
|
-
if (array) {
|
|
4497
|
-
str = str.split('\n').map(function(line) {
|
|
4498
|
-
return ' ' + line;
|
|
4499
|
-
}).join('\n').substr(2);
|
|
4500
|
-
} else {
|
|
4501
|
-
str = '\n' + str.split('\n').map(function(line) {
|
|
4502
|
-
return ' ' + line;
|
|
4503
|
-
}).join('\n');
|
|
4504
|
-
}
|
|
4505
|
-
}
|
|
4506
|
-
} else {
|
|
4507
|
-
str = ctx.stylize('[Circular]', 'special');
|
|
4508
|
-
}
|
|
4509
|
-
}
|
|
4510
|
-
if (isUndefined(name)) {
|
|
4511
|
-
if (array && key.match(/^\d+$/)) {
|
|
4512
|
-
return str;
|
|
4513
|
-
}
|
|
4514
|
-
name = JSON.stringify('' + key);
|
|
4515
|
-
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
4516
|
-
name = name.substr(1, name.length - 2);
|
|
4517
|
-
name = ctx.stylize(name, 'name');
|
|
4518
|
-
} else {
|
|
4519
|
-
name = name.replace(/'/g, "\\'")
|
|
4520
|
-
.replace(/\\"/g, '"')
|
|
4521
|
-
.replace(/(^"|"$)/g, "'");
|
|
4522
|
-
name = ctx.stylize(name, 'string');
|
|
4523
|
-
}
|
|
4524
|
-
}
|
|
4525
|
-
|
|
4526
|
-
return name + ': ' + str;
|
|
4527
|
-
}
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
function reduceToSingleString(output, base, braces) {
|
|
4531
|
-
var numLinesEst = 0;
|
|
4532
|
-
var length = output.reduce(function(prev, cur) {
|
|
4533
|
-
numLinesEst++;
|
|
4534
|
-
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
|
4535
|
-
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
4536
|
-
}, 0);
|
|
4537
|
-
|
|
4538
|
-
if (length > 60) {
|
|
4539
|
-
return braces[0] +
|
|
4540
|
-
(base === '' ? '' : base + '\n ') +
|
|
4541
|
-
' ' +
|
|
4542
|
-
output.join(',\n ') +
|
|
4543
|
-
' ' +
|
|
4544
|
-
braces[1];
|
|
4545
|
-
}
|
|
4546
|
-
|
|
4547
|
-
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
4548
|
-
}
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4552
|
-
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4553
|
-
function isArray(ar) {
|
|
4554
|
-
return Array.isArray(ar);
|
|
4555
|
-
}
|
|
4556
|
-
exports.isArray = isArray;
|
|
4557
|
-
|
|
4558
|
-
function isBoolean(arg) {
|
|
4559
|
-
return typeof arg === 'boolean';
|
|
4560
|
-
}
|
|
4561
|
-
exports.isBoolean = isBoolean;
|
|
4562
|
-
|
|
4563
|
-
function isNull(arg) {
|
|
4564
|
-
return arg === null;
|
|
4565
|
-
}
|
|
4566
|
-
exports.isNull = isNull;
|
|
4567
|
-
|
|
4568
|
-
function isNullOrUndefined(arg) {
|
|
4569
|
-
return arg == null;
|
|
4570
|
-
}
|
|
4571
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
4572
|
-
|
|
4573
|
-
function isNumber(arg) {
|
|
4574
|
-
return typeof arg === 'number';
|
|
4575
|
-
}
|
|
4576
|
-
exports.isNumber = isNumber;
|
|
4577
|
-
|
|
4578
|
-
function isString(arg) {
|
|
4579
|
-
return typeof arg === 'string';
|
|
4580
|
-
}
|
|
4581
|
-
exports.isString = isString;
|
|
4582
|
-
|
|
4583
|
-
function isSymbol(arg) {
|
|
4584
|
-
return typeof arg === 'symbol';
|
|
4585
|
-
}
|
|
4586
|
-
exports.isSymbol = isSymbol;
|
|
4587
|
-
|
|
4588
|
-
function isUndefined(arg) {
|
|
4589
|
-
return arg === void 0;
|
|
4590
|
-
}
|
|
4591
|
-
exports.isUndefined = isUndefined;
|
|
4592
|
-
|
|
4593
|
-
function isRegExp(re) {
|
|
4594
|
-
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
4595
|
-
}
|
|
4596
|
-
exports.isRegExp = isRegExp;
|
|
4597
|
-
|
|
4598
|
-
function isObject(arg) {
|
|
4599
|
-
return typeof arg === 'object' && arg !== null;
|
|
4600
|
-
}
|
|
4601
|
-
exports.isObject = isObject;
|
|
4602
|
-
|
|
4603
|
-
function isDate(d) {
|
|
4604
|
-
return isObject(d) && objectToString(d) === '[object Date]';
|
|
4605
|
-
}
|
|
4606
|
-
exports.isDate = isDate;
|
|
4104
|
+
"use strict";
|
|
4105
|
+
module.exports = markdownit;
|
|
4607
4106
|
|
|
4608
|
-
|
|
4609
|
-
return isObject(e) &&
|
|
4610
|
-
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
4611
|
-
}
|
|
4612
|
-
exports.isError = isError;
|
|
4107
|
+
/***/ }),
|
|
4613
4108
|
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
function isPrimitive(arg) {
|
|
4620
|
-
return arg === null ||
|
|
4621
|
-
typeof arg === 'boolean' ||
|
|
4622
|
-
typeof arg === 'number' ||
|
|
4623
|
-
typeof arg === 'string' ||
|
|
4624
|
-
typeof arg === 'symbol' || // ES6 symbol
|
|
4625
|
-
typeof arg === 'undefined';
|
|
4626
|
-
}
|
|
4627
|
-
exports.isPrimitive = isPrimitive;
|
|
4109
|
+
/***/ "?591e":
|
|
4110
|
+
/*!********************!*\
|
|
4111
|
+
!*** os (ignored) ***!
|
|
4112
|
+
\********************/
|
|
4113
|
+
/***/ (() => {
|
|
4628
4114
|
|
|
4629
|
-
|
|
4115
|
+
/* (ignored) */
|
|
4630
4116
|
|
|
4631
|
-
|
|
4632
|
-
return Object.prototype.toString.call(o);
|
|
4633
|
-
}
|
|
4117
|
+
/***/ }),
|
|
4634
4118
|
|
|
4119
|
+
/***/ "?ec0a":
|
|
4120
|
+
/*!********************!*\
|
|
4121
|
+
!*** fs (ignored) ***!
|
|
4122
|
+
\********************/
|
|
4123
|
+
/***/ (() => {
|
|
4635
4124
|
|
|
4636
|
-
|
|
4637
|
-
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
4638
|
-
}
|
|
4125
|
+
/* (ignored) */
|
|
4639
4126
|
|
|
4127
|
+
/***/ }),
|
|
4640
4128
|
|
|
4641
|
-
|
|
4642
|
-
|
|
4129
|
+
/***/ "?b85c":
|
|
4130
|
+
/*!**********************!*\
|
|
4131
|
+
!*** path (ignored) ***!
|
|
4132
|
+
\**********************/
|
|
4133
|
+
/***/ (() => {
|
|
4643
4134
|
|
|
4644
|
-
|
|
4645
|
-
function timestamp() {
|
|
4646
|
-
var d = new Date();
|
|
4647
|
-
var time = [pad(d.getHours()),
|
|
4648
|
-
pad(d.getMinutes()),
|
|
4649
|
-
pad(d.getSeconds())].join(':');
|
|
4650
|
-
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
4651
|
-
}
|
|
4135
|
+
/* (ignored) */
|
|
4652
4136
|
|
|
4137
|
+
/***/ }),
|
|
4653
4138
|
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4139
|
+
/***/ "?96a2":
|
|
4140
|
+
/*!**********************!*\
|
|
4141
|
+
!*** util (ignored) ***!
|
|
4142
|
+
\**********************/
|
|
4143
|
+
/***/ (() => {
|
|
4658
4144
|
|
|
4145
|
+
/* (ignored) */
|
|
4659
4146
|
|
|
4660
|
-
|
|
4661
|
-
* Inherit the prototype methods from one constructor into another.
|
|
4662
|
-
*
|
|
4663
|
-
* The Function.prototype.inherits from lang.js rewritten as a standalone
|
|
4664
|
-
* function (not on Function.prototype). NOTE: If this file is to be loaded
|
|
4665
|
-
* during bootstrapping this function needs to be rewritten using some native
|
|
4666
|
-
* functions as prototype setup using normal JavaScript does not work as
|
|
4667
|
-
* expected during bootstrapping (see mirror.js in r114903).
|
|
4668
|
-
*
|
|
4669
|
-
* @param {function} ctor Constructor function which needs to inherit the
|
|
4670
|
-
* prototype.
|
|
4671
|
-
* @param {function} superCtor Constructor function to inherit prototype from.
|
|
4672
|
-
*/
|
|
4673
|
-
exports.inherits = require('inherits');
|
|
4674
|
-
|
|
4675
|
-
exports._extend = function(origin, add) {
|
|
4676
|
-
// Don't do anything if add isn't an object
|
|
4677
|
-
if (!add || !isObject(add)) return origin;
|
|
4678
|
-
|
|
4679
|
-
var keys = Object.keys(add);
|
|
4680
|
-
var i = keys.length;
|
|
4681
|
-
while (i--) {
|
|
4682
|
-
origin[keys[i]] = add[keys[i]];
|
|
4683
|
-
}
|
|
4684
|
-
return origin;
|
|
4685
|
-
};
|
|
4147
|
+
/***/ }),
|
|
4686
4148
|
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4149
|
+
/***/ "../package.json":
|
|
4150
|
+
/*!***********************!*\
|
|
4151
|
+
!*** ../package.json ***!
|
|
4152
|
+
\***********************/
|
|
4153
|
+
/***/ ((module) => {
|
|
4690
4154
|
|
|
4691
|
-
|
|
4692
|
-
},{"
|
|
4693
|
-
|
|
4155
|
+
"use strict";
|
|
4156
|
+
module.exports = JSON.parse('{"name":"markdownlint","version":"0.24.0","description":"A Node.js style checker and lint tool for Markdown/CommonMark files.","main":"lib/markdownlint.js","types":"lib/markdownlint.d.ts","author":"David Anson (https://dlaa.me/)","license":"MIT","homepage":"https://github.com/DavidAnson/markdownlint","repository":{"type":"git","url":"https://github.com/DavidAnson/markdownlint.git"},"bugs":"https://github.com/DavidAnson/markdownlint/issues","scripts":{"build-config":"npm run build-config-schema && npm run build-config-example","build-config-example":"node schema/build-config-example.js","build-config-schema":"node schema/build-config-schema.js","build-declaration":"tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf \'lib/{c,md,r}*.d.ts\' \'helpers/*.d.ts\'","build-demo":"cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && webpack --no-stats","build-example":"npm install --no-save --ignore-scripts grunt grunt-cli gulp through2","ci":"npm-run-all --continue-on-error --parallel test-cover lint declaration build-config build-demo && git diff --exit-code","clean-test-repos":"rimraf test-repos","clone-test-repos-dotnet-docs":"cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet","clone-test-repos-eslint-eslint":"cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet","clone-test-repos-mkdocs-mkdocs":"cd test-repos && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet","clone-test-repos-mochajs-mocha":"cd test-repos && git clone https://github.com/mochajs/mocha mochajs-mocha --depth 1 --no-tags --quiet","clone-test-repos-pi-hole-docs":"cd test-repos && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet","clone-test-repos-v8-v8-dev":"cd test-repos && git clone https://github.com/v8/v8.dev v8-v8-dev --depth 1 --no-tags --quiet","clone-test-repos-webhintio-hint":"cd test-repos && git clone https://github.com/webhintio/hint webhintio-hint --depth 1 --no-tags --quiet","clone-test-repos-webpack-webpack-js-org":"cd test-repos && git clone https://github.com/webpack/webpack.js.org webpack-webpack-js-org --depth 1 --no-tags --quiet","clone-test-repos":"mkdir test-repos && cd test-repos && npm run clone-test-repos-eslint-eslint && npm run clone-test-repos-mkdocs-mkdocs && npm run clone-test-repos-mochajs-mocha && npm run clone-test-repos-pi-hole-docs && npm run clone-test-repos-webhintio-hint && npm run clone-test-repos-webpack-webpack-js-org","clone-test-repos-large":"npm run clone-test-repos && cd test-repos && npm run clone-test-repos-dotnet-docs && npm run clone-test-repos-v8-v8-dev","declaration":"npm run build-declaration && npm run test-declaration","example":"cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint","lint":"eslint --max-warnings 0 .","lint-test-repos":"ava --timeout=5m test/markdownlint-test-repos.js","test":"ava test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js","test-cover":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 npm test","test-declaration":"cd example/typescript && tsc && node type-check.js","test-extra":"ava --timeout=5m test/markdownlint-test-extra.js"},"engines":{"node":">=10"},"dependencies":{"markdown-it":"12.2.0"},"devDependencies":{"ava":"~3.15.0","c8":"~7.8.0","cpy-cli":"~3.1.1","eslint":"~7.32.0","eslint-plugin-jsdoc":"~36.0.7","eslint-plugin-node":"~11.1.0","eslint-plugin-unicorn":"~35.0.0","globby":"~11.0.4","js-yaml":"~4.1.0","markdown-it-for-inline":"~0.1.1","markdown-it-sub":"~1.0.0","markdown-it-sup":"~1.0.0","markdown-it-texmath":"~0.9.1","markdownlint-rule-helpers":"~0.14.0","npm-run-all":"~4.1.5","rimraf":"~3.0.2","strip-json-comments":"~3.1.1","toml":"~3.0.0","ts-loader":"~9.2.5","tv4":"~1.3.0","typescript":"~4.3.5","webpack":"~5.51.1","webpack-cli":"~4.8.0"},"keywords":["markdown","lint","md","CommonMark","markdownlint"]}');
|
|
4157
|
+
|
|
4158
|
+
/***/ })
|
|
4159
|
+
|
|
4160
|
+
/******/ });
|
|
4161
|
+
/************************************************************************/
|
|
4162
|
+
/******/ // The module cache
|
|
4163
|
+
/******/ var __webpack_module_cache__ = {};
|
|
4164
|
+
/******/
|
|
4165
|
+
/******/ // The require function
|
|
4166
|
+
/******/ function __webpack_require__(moduleId) {
|
|
4167
|
+
/******/ // Check if module is in cache
|
|
4168
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
4169
|
+
/******/ if (cachedModule !== undefined) {
|
|
4170
|
+
/******/ return cachedModule.exports;
|
|
4171
|
+
/******/ }
|
|
4172
|
+
/******/ // Create a new module (and put it into the cache)
|
|
4173
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
4174
|
+
/******/ // no module.id needed
|
|
4175
|
+
/******/ // no module.loaded needed
|
|
4176
|
+
/******/ exports: {}
|
|
4177
|
+
/******/ };
|
|
4178
|
+
/******/
|
|
4179
|
+
/******/ // Execute the module function
|
|
4180
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
4181
|
+
/******/
|
|
4182
|
+
/******/ // Return the exports of the module
|
|
4183
|
+
/******/ return module.exports;
|
|
4184
|
+
/******/ }
|
|
4185
|
+
/******/
|
|
4186
|
+
/************************************************************************/
|
|
4187
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
4188
|
+
/******/ (() => {
|
|
4189
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
4190
|
+
/******/ })();
|
|
4191
|
+
/******/
|
|
4192
|
+
/************************************************************************/
|
|
4193
|
+
/******/
|
|
4194
|
+
/******/ // startup
|
|
4195
|
+
/******/ // Load entry module and return exports
|
|
4196
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
4197
|
+
/******/ var __webpack_exports__ = __webpack_require__("../lib/markdownlint.js");
|
|
4198
|
+
/******/ markdownlint = __webpack_exports__;
|
|
4199
|
+
/******/
|
|
4200
|
+
/******/ })()
|
|
4201
|
+
;
|