markdownlint 0.21.0 → 0.23.1
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 +106 -70
- package/demo/markdownlint-browser.js +1037 -1600
- package/doc/Rules.md +106 -76
- package/helpers/LICENSE +1 -1
- package/helpers/helpers.js +83 -33
- package/helpers/package.json +1 -1
- package/lib/markdownlint.d.ts +11 -5
- package/lib/markdownlint.js +102 -38
- 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/md011.js +10 -6
- 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/md031.js +6 -5
- package/lib/md032.js +2 -2
- package/lib/md037.js +22 -8
- package/lib/md039.js +2 -2
- package/lib/md041.js +14 -3
- package/lib/md043.js +22 -11
- package/lib/rules.js +2 -1
- package/package.json +32 -33
- package/schema/.markdownlint.jsonc +250 -0
- package/schema/.markdownlint.yaml +225 -0
- package/schema/markdownlint-config-schema.json +23 -20
- package/schema/build-config-schema.js +0 -410
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/*! markdownlint 0.23.1 https://github.com/DavidAnson/markdownlint @license MIT */
|
|
2
|
+
var markdownlint;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 */ "?5533");
|
|
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;
|
|
@@ -45,7 +55,10 @@ var linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
|
|
|
45
55
|
// readFile options for reading with the UTF-8 encoding
|
|
46
56
|
module.exports.utf8Encoding = "utf8";
|
|
47
57
|
// All punctuation characters (normal and full-width)
|
|
48
|
-
|
|
58
|
+
var allPunctuation = ".,;:!?。,;:!?";
|
|
59
|
+
module.exports.allPunctuation = allPunctuation;
|
|
60
|
+
// All punctuation characters without question mark (normal and full-width)
|
|
61
|
+
module.exports.allPunctuationNoQuestion = allPunctuation.replace(/[??]/gu, "");
|
|
49
62
|
// Returns true iff the input is a number
|
|
50
63
|
module.exports.isNumber = function isNumber(obj) {
|
|
51
64
|
return typeof obj === "number";
|
|
@@ -66,6 +79,8 @@ module.exports.isObject = function isObject(obj) {
|
|
|
66
79
|
// Example: Contains nothing, whitespace, or comments
|
|
67
80
|
var blankLineRe = />|(?:<!--.*?-->)/g;
|
|
68
81
|
module.exports.isBlankLine = function isBlankLine(line) {
|
|
82
|
+
// Call to String.replace follows best practices and is not a security check
|
|
83
|
+
// False-positive for js/incomplete-multi-character-sanitization
|
|
69
84
|
return !line || !line.trim() || !line.replace(blankLineRe, "").trim();
|
|
70
85
|
};
|
|
71
86
|
/**
|
|
@@ -97,32 +112,47 @@ module.exports.includesSorted = function includesSorted(array, element) {
|
|
|
97
112
|
}
|
|
98
113
|
return false;
|
|
99
114
|
};
|
|
100
|
-
// Replaces the
|
|
115
|
+
// Replaces the content of properly-formatted CommonMark comments with "."
|
|
101
116
|
// This preserves the line/column information for the rest of the document
|
|
102
|
-
//
|
|
103
|
-
//
|
|
117
|
+
// https://spec.commonmark.org/0.29/#html-blocks
|
|
118
|
+
// https://spec.commonmark.org/0.29/#html-comment
|
|
104
119
|
var htmlCommentBegin = "<!--";
|
|
105
120
|
var htmlCommentEnd = "-->";
|
|
106
121
|
module.exports.clearHtmlCommentText = function clearHtmlCommentText(text) {
|
|
107
122
|
var i = 0;
|
|
108
123
|
while ((i = text.indexOf(htmlCommentBegin, i)) !== -1) {
|
|
109
|
-
var j = text.indexOf(htmlCommentEnd, i);
|
|
124
|
+
var j = text.indexOf(htmlCommentEnd, i + 2);
|
|
110
125
|
if (j === -1) {
|
|
111
126
|
// Un-terminated comments are treated as text
|
|
112
127
|
break;
|
|
113
128
|
}
|
|
114
|
-
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
// If the comment has content...
|
|
130
|
+
if (j > i + htmlCommentBegin.length) {
|
|
131
|
+
var k = i - 1;
|
|
132
|
+
while (text[k] === " ") {
|
|
133
|
+
k--;
|
|
134
|
+
}
|
|
135
|
+
// If comment is not within an indented code block...
|
|
136
|
+
if (k >= i - 4) {
|
|
137
|
+
var content = text.slice(i + htmlCommentBegin.length, j);
|
|
138
|
+
var isBlock = (k < 0) || (text[k] === "\n");
|
|
139
|
+
var isValid = isBlock ||
|
|
140
|
+
(!content.startsWith(">") && !content.startsWith("->") &&
|
|
141
|
+
!content.endsWith("-") && !content.includes("--"));
|
|
142
|
+
// If a valid block/inline comment...
|
|
143
|
+
if (isValid) {
|
|
144
|
+
var inlineCommentIndex = text
|
|
145
|
+
.slice(i, j + htmlCommentEnd.length)
|
|
146
|
+
.search(inlineCommentRe);
|
|
147
|
+
// If not a markdownlint inline directive...
|
|
148
|
+
if (inlineCommentIndex === -1) {
|
|
149
|
+
text =
|
|
150
|
+
text.slice(0, i + htmlCommentBegin.length) +
|
|
151
|
+
content.replace(/[^\r\n]/g, ".") +
|
|
152
|
+
text.slice(j);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
126
156
|
}
|
|
127
157
|
i = j + htmlCommentEnd.length;
|
|
128
158
|
}
|
|
@@ -167,7 +197,7 @@ module.exports.fencedCodeBlockStyleFor =
|
|
|
167
197
|
*/
|
|
168
198
|
function indentFor(token) {
|
|
169
199
|
var line = token.line.replace(/^[\s>]*(> |>)/, "");
|
|
170
|
-
return line.length - line.
|
|
200
|
+
return line.length - line.trimStart().length;
|
|
171
201
|
}
|
|
172
202
|
module.exports.indentFor = indentFor;
|
|
173
203
|
// Returns the heading style for a heading token
|
|
@@ -213,44 +243,59 @@ function filterTokens(params, type, handler) {
|
|
|
213
243
|
});
|
|
214
244
|
}
|
|
215
245
|
module.exports.filterTokens = filterTokens;
|
|
246
|
+
/**
|
|
247
|
+
* Returns whether a token is a math block (created by markdown-it-texmath).
|
|
248
|
+
*
|
|
249
|
+
* @param {Object} token MarkdownItToken instance.
|
|
250
|
+
* @returns {boolean} True iff token is a math block.
|
|
251
|
+
*/
|
|
252
|
+
function isMathBlock(token) {
|
|
253
|
+
return ((token.tag === "math") &&
|
|
254
|
+
token.type.startsWith("math_block") &&
|
|
255
|
+
!token.type.endsWith("_end"));
|
|
256
|
+
}
|
|
216
257
|
// Get line metadata array
|
|
217
258
|
module.exports.getLineMetadata = function getLineMetadata(params) {
|
|
218
|
-
var lineMetadata = params.lines.map(function
|
|
219
|
-
|
|
220
|
-
});
|
|
221
|
-
filterTokens(params, "fence", function forToken(token) {
|
|
259
|
+
var lineMetadata = params.lines.map(function (line, index) { return [line, index, false, 0, false, false, false, false]; });
|
|
260
|
+
filterTokens(params, "fence", function (token) {
|
|
222
261
|
lineMetadata[token.map[0]][3] = 1;
|
|
223
262
|
lineMetadata[token.map[1] - 1][3] = -1;
|
|
224
263
|
for (var i = token.map[0] + 1; i < token.map[1] - 1; i++) {
|
|
225
264
|
lineMetadata[i][2] = true;
|
|
226
265
|
}
|
|
227
266
|
});
|
|
228
|
-
filterTokens(params, "code_block", function
|
|
267
|
+
filterTokens(params, "code_block", function (token) {
|
|
229
268
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
230
269
|
lineMetadata[i][2] = true;
|
|
231
270
|
}
|
|
232
271
|
});
|
|
233
|
-
filterTokens(params, "table_open", function
|
|
272
|
+
filterTokens(params, "table_open", function (token) {
|
|
234
273
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
235
274
|
lineMetadata[i][4] = true;
|
|
236
275
|
}
|
|
237
276
|
});
|
|
238
|
-
filterTokens(params, "list_item_open", function
|
|
277
|
+
filterTokens(params, "list_item_open", function (token) {
|
|
239
278
|
var count = 1;
|
|
240
279
|
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
241
280
|
lineMetadata[i][5] = count;
|
|
242
281
|
count++;
|
|
243
282
|
}
|
|
244
283
|
});
|
|
245
|
-
filterTokens(params, "hr", function
|
|
284
|
+
filterTokens(params, "hr", function (token) {
|
|
246
285
|
lineMetadata[token.map[0]][6] = true;
|
|
247
286
|
});
|
|
287
|
+
params.tokens.filter(isMathBlock).forEach(function (token) {
|
|
288
|
+
for (var i = token.map[0]; i < token.map[1]; i++) {
|
|
289
|
+
lineMetadata[i][7] = true;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
248
292
|
return lineMetadata;
|
|
249
293
|
};
|
|
250
294
|
// Calls the provided function for each line (with context)
|
|
251
295
|
module.exports.forEachLine = function forEachLine(lineMetadata, handler) {
|
|
252
296
|
lineMetadata.forEach(function forMetadata(metadata) {
|
|
253
|
-
// Parameters:
|
|
297
|
+
// Parameters:
|
|
298
|
+
// line, lineIndex, inCode, onFence, inTable, inItem, inBreak, inMath
|
|
254
299
|
handler.apply(void 0, metadata);
|
|
255
300
|
});
|
|
256
301
|
};
|
|
@@ -262,7 +307,11 @@ module.exports.flattenLists = function flattenLists(params) {
|
|
|
262
307
|
var nesting = 0;
|
|
263
308
|
var nestingStack = [];
|
|
264
309
|
var lastWithMap = { "map": [0, 1] };
|
|
265
|
-
params.tokens.forEach(function
|
|
310
|
+
params.tokens.forEach(function (token) {
|
|
311
|
+
if (isMathBlock(token) && token.map[1]) {
|
|
312
|
+
// markdown-it-texmath plugin does not account for math_block_end
|
|
313
|
+
token.map[1]++;
|
|
314
|
+
}
|
|
266
315
|
if ((token.type === "bullet_list_open") ||
|
|
267
316
|
(token.type === "ordered_list_open")) {
|
|
268
317
|
// Save current context and start a new one
|
|
@@ -353,6 +402,7 @@ function forEachInlineCodeSpan(input, handler) {
|
|
|
353
402
|
var currentTicks = 0;
|
|
354
403
|
var state = "normal";
|
|
355
404
|
// Deliberate <= so trailing 0 completes the last span (ex: "text `code`")
|
|
405
|
+
// False-positive for js/index-out-of-bounds
|
|
356
406
|
for (; index <= input.length; index++) {
|
|
357
407
|
var char = input[index];
|
|
358
408
|
// Ignore backticks in link destination
|
|
@@ -481,7 +531,7 @@ module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
|
|
481
531
|
module.exports.frontMatterHasTitle =
|
|
482
532
|
function frontMatterHasTitle(frontMatterLines, frontMatterTitlePattern) {
|
|
483
533
|
var ignoreFrontMatter = (frontMatterTitlePattern !== undefined) && !frontMatterTitlePattern;
|
|
484
|
-
var frontMatterTitleRe = new RegExp(String(frontMatterTitlePattern || "^\\s
|
|
534
|
+
var frontMatterTitleRe = new RegExp(String(frontMatterTitlePattern || "^\\s*\"?title\"?\\s*[:=]"), "i");
|
|
485
535
|
return !ignoreFrontMatter &&
|
|
486
536
|
frontMatterLines.some(function (line) { return frontMatterTitleRe.test(line); });
|
|
487
537
|
};
|
|
@@ -653,8 +703,9 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|
|
653
703
|
var lineIndex = lineNumber - 1;
|
|
654
704
|
var editIndex = editColumn - 1;
|
|
655
705
|
if ((lineIndex !== lastLineIndex) ||
|
|
656
|
-
(
|
|
657
|
-
(
|
|
706
|
+
(deleteCount === -1) ||
|
|
707
|
+
((editIndex + deleteCount) <=
|
|
708
|
+
(lastEditIndex - ((deleteCount > 0) ? 0 : 1)))) {
|
|
658
709
|
lines[lineIndex] = applyFix(lines[lineIndex], fixInfo, lineEnding);
|
|
659
710
|
}
|
|
660
711
|
lastLineIndex = lineIndex;
|
|
@@ -664,9 +715,18 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|
|
664
715
|
return lines.filter(function (line) { return line !== null; }).join(lineEnding);
|
|
665
716
|
};
|
|
666
717
|
|
|
667
|
-
|
|
668
|
-
|
|
718
|
+
|
|
719
|
+
/***/ }),
|
|
720
|
+
|
|
721
|
+
/***/ "../lib/cache.js":
|
|
722
|
+
/*!***********************!*\
|
|
723
|
+
!*** ../lib/cache.js ***!
|
|
724
|
+
\***********************/
|
|
725
|
+
/***/ ((module) => {
|
|
726
|
+
|
|
669
727
|
"use strict";
|
|
728
|
+
// @ts-check
|
|
729
|
+
|
|
670
730
|
var lineMetadata = null;
|
|
671
731
|
module.exports.lineMetadata = function (value) {
|
|
672
732
|
if (value) {
|
|
@@ -686,9 +746,18 @@ module.exports.clear = function () {
|
|
|
686
746
|
flattenedLists = null;
|
|
687
747
|
};
|
|
688
748
|
|
|
689
|
-
|
|
690
|
-
|
|
749
|
+
|
|
750
|
+
/***/ }),
|
|
751
|
+
|
|
752
|
+
/***/ "../lib/markdownlint.js":
|
|
753
|
+
/*!******************************!*\
|
|
754
|
+
!*** ../lib/markdownlint.js ***!
|
|
755
|
+
\******************************/
|
|
756
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
757
|
+
|
|
691
758
|
"use strict";
|
|
759
|
+
// @ts-check
|
|
760
|
+
|
|
692
761
|
var __assign = (this && this.__assign) || function () {
|
|
693
762
|
__assign = Object.assign || function(t) {
|
|
694
763
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -707,13 +776,17 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
707
776
|
r[k] = a[j];
|
|
708
777
|
return r;
|
|
709
778
|
};
|
|
710
|
-
var fs =
|
|
711
|
-
var path =
|
|
712
|
-
var
|
|
713
|
-
var markdownIt =
|
|
714
|
-
var rules =
|
|
715
|
-
var helpers =
|
|
716
|
-
var cache =
|
|
779
|
+
var fs = __webpack_require__(/*! fs */ "?65c5");
|
|
780
|
+
var path = __webpack_require__(/*! path */ "?0f27");
|
|
781
|
+
var promisify = __webpack_require__(/*! util */ "?0bed").promisify;
|
|
782
|
+
var markdownIt = __webpack_require__(/*! markdown-it */ "markdown-it");
|
|
783
|
+
var rules = __webpack_require__(/*! ./rules */ "../lib/rules.js");
|
|
784
|
+
var helpers = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
|
785
|
+
var cache = __webpack_require__(/*! ./cache */ "../lib/cache.js");
|
|
786
|
+
// @ts-ignore
|
|
787
|
+
// eslint-disable-next-line camelcase, max-len, no-inline-comments, no-undef
|
|
788
|
+
var dynamicRequire = (typeof require === "undefined") ? __webpack_require__("../lib sync recursive") : /* c8 ignore next */ require;
|
|
789
|
+
// Capture native require implementation for dynamic loading of modules
|
|
717
790
|
var deprecatedRuleNames = ["MD002", "MD006"];
|
|
718
791
|
/**
|
|
719
792
|
* Validate the list of rules for structure and reuse.
|
|
@@ -753,10 +826,10 @@ function validateRuleList(ruleList) {
|
|
|
753
826
|
result = newError(property);
|
|
754
827
|
}
|
|
755
828
|
});
|
|
756
|
-
if (!result &&
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
829
|
+
if (!result &&
|
|
830
|
+
rule.information &&
|
|
831
|
+
(Object.getPrototypeOf(rule.information) !== URL.prototype)) {
|
|
832
|
+
result = newError("information");
|
|
760
833
|
}
|
|
761
834
|
if (!result) {
|
|
762
835
|
rule.names.forEach(function forName(name) {
|
|
@@ -874,20 +947,23 @@ function removeFrontMatter(content, frontMatter) {
|
|
|
874
947
|
* @returns {void}
|
|
875
948
|
*/
|
|
876
949
|
function annotateTokens(tokens, lines) {
|
|
877
|
-
var
|
|
950
|
+
var tableMap = null;
|
|
878
951
|
tokens.forEach(function forToken(token) {
|
|
879
|
-
// Handle missing maps for table body
|
|
880
|
-
if (token.type === "
|
|
881
|
-
|
|
952
|
+
// Handle missing maps for table head/body
|
|
953
|
+
if ((token.type === "thead_open") ||
|
|
954
|
+
(token.type === "tbody_open")) {
|
|
955
|
+
tableMap = token.map.slice();
|
|
882
956
|
}
|
|
883
|
-
else if ((token.type === "tr_close") &&
|
|
884
|
-
|
|
957
|
+
else if ((token.type === "tr_close") &&
|
|
958
|
+
tableMap) {
|
|
959
|
+
tableMap[0]++;
|
|
885
960
|
}
|
|
886
|
-
else if (token.type === "
|
|
887
|
-
|
|
961
|
+
else if ((token.type === "thead_close") ||
|
|
962
|
+
(token.type === "tbody_close")) {
|
|
963
|
+
tableMap = null;
|
|
888
964
|
}
|
|
889
|
-
if (
|
|
890
|
-
token.map =
|
|
965
|
+
if (tableMap && !token.map) {
|
|
966
|
+
token.map = tableMap.slice();
|
|
891
967
|
}
|
|
892
968
|
// Update token metadata
|
|
893
969
|
if (token.map) {
|
|
@@ -1010,13 +1086,13 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1010
1086
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1011
1087
|
function handleInlineConfig(perLine, forEachMatch, forEachLine) {
|
|
1012
1088
|
var input = perLine ? lines : [lines.join("\n")];
|
|
1013
|
-
input.forEach(function (line) {
|
|
1089
|
+
input.forEach(function (line, lineIndex) {
|
|
1014
1090
|
if (!noInlineConfig) {
|
|
1015
1091
|
var match = null;
|
|
1016
1092
|
while ((match = helpers.inlineCommentRe.exec(line))) {
|
|
1017
1093
|
var action = (match[1] || match[3]).toUpperCase();
|
|
1018
1094
|
var parameter = match[2] || match[4];
|
|
1019
|
-
forEachMatch(action, parameter);
|
|
1095
|
+
forEachMatch(action, parameter, lineIndex + 1);
|
|
1020
1096
|
}
|
|
1021
1097
|
}
|
|
1022
1098
|
if (forEachLine) {
|
|
@@ -1030,29 +1106,28 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1030
1106
|
try {
|
|
1031
1107
|
var json = JSON.parse(parameter);
|
|
1032
1108
|
config = __assign(__assign({}, config), json);
|
|
1033
|
-
// eslint-disable-next-line unicorn/prefer-optional-catch-binding
|
|
1034
1109
|
}
|
|
1035
|
-
catch (
|
|
1110
|
+
catch (_a) {
|
|
1036
1111
|
// Ignore parse errors for inline configuration
|
|
1037
1112
|
}
|
|
1038
1113
|
}
|
|
1039
1114
|
}
|
|
1040
1115
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1041
|
-
function applyEnableDisable(action, parameter) {
|
|
1116
|
+
function applyEnableDisable(action, parameter, state) {
|
|
1042
1117
|
var enabled = (action.startsWith("ENABLE"));
|
|
1043
1118
|
var items = parameter ?
|
|
1044
1119
|
parameter.trim().toUpperCase().split(/\s+/) :
|
|
1045
1120
|
allRuleNames;
|
|
1046
1121
|
items.forEach(function (nameUpper) {
|
|
1047
1122
|
(aliasToRuleNames[nameUpper] || []).forEach(function (ruleName) {
|
|
1048
|
-
|
|
1123
|
+
state[ruleName] = enabled;
|
|
1049
1124
|
});
|
|
1050
1125
|
});
|
|
1051
1126
|
}
|
|
1052
1127
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1053
1128
|
function enableDisableFile(action, parameter) {
|
|
1054
1129
|
if ((action === "ENABLE-FILE") || (action === "DISABLE-FILE")) {
|
|
1055
|
-
applyEnableDisable(action, parameter);
|
|
1130
|
+
applyEnableDisable(action, parameter, enabledRules);
|
|
1056
1131
|
}
|
|
1057
1132
|
}
|
|
1058
1133
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -1065,12 +1140,18 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1065
1140
|
}
|
|
1066
1141
|
else if ((action === "ENABLE") || (action === "DISABLE")) {
|
|
1067
1142
|
enabledRules = __assign({}, enabledRules);
|
|
1068
|
-
applyEnableDisable(action, parameter);
|
|
1143
|
+
applyEnableDisable(action, parameter, enabledRules);
|
|
1069
1144
|
}
|
|
1070
1145
|
}
|
|
1071
1146
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1072
1147
|
function updateLineState() {
|
|
1073
|
-
enabledRulesPerLineNumber.push(enabledRules);
|
|
1148
|
+
enabledRulesPerLineNumber.push(__assign({}, enabledRules));
|
|
1149
|
+
}
|
|
1150
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1151
|
+
function disableNextLine(action, parameter, lineNumber) {
|
|
1152
|
+
if (action === "DISABLE-NEXT-LINE") {
|
|
1153
|
+
applyEnableDisable(action, parameter, enabledRulesPerLineNumber[lineNumber + 1] || {});
|
|
1154
|
+
}
|
|
1074
1155
|
}
|
|
1075
1156
|
// Handle inline comments
|
|
1076
1157
|
handleInlineConfig(false, configureFile);
|
|
@@ -1083,6 +1164,7 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|
|
1083
1164
|
capturedRules = enabledRules;
|
|
1084
1165
|
handleInlineConfig(true, enableDisableFile);
|
|
1085
1166
|
handleInlineConfig(true, captureRestoreEnableDisable, updateLineState);
|
|
1167
|
+
handleInlineConfig(true, disableNextLine);
|
|
1086
1168
|
// Return results
|
|
1087
1169
|
return {
|
|
1088
1170
|
effectiveConfig: effectiveConfig,
|
|
@@ -1123,8 +1205,8 @@ function uniqueFilterForSortedErrors(value, index, array) {
|
|
|
1123
1205
|
*
|
|
1124
1206
|
* @param {Rule[]} ruleList List of rules.
|
|
1125
1207
|
* @param {string} name Identifier for the content.
|
|
1126
|
-
* @param {string} content Markdown content
|
|
1127
|
-
* @param {Object} md markdown-it
|
|
1208
|
+
* @param {string} content Markdown content.
|
|
1209
|
+
* @param {Object} md Instance of markdown-it.
|
|
1128
1210
|
* @param {Configuration} config Configuration object.
|
|
1129
1211
|
* @param {RegExp} frontMatter Regular expression for front matter.
|
|
1130
1212
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
|
@@ -1320,7 +1402,7 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
|
|
1320
1402
|
*
|
|
1321
1403
|
* @param {Rule[]} ruleList List of rules.
|
|
1322
1404
|
* @param {string} file Path of file to lint.
|
|
1323
|
-
* @param {Object} md markdown-it
|
|
1405
|
+
* @param {Object} md Instance of markdown-it.
|
|
1324
1406
|
* @param {Configuration} config Configuration object.
|
|
1325
1407
|
* @param {RegExp} frontMatter Regular expression for front matter.
|
|
1326
1408
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
|
@@ -1359,6 +1441,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1359
1441
|
// Normalize inputs
|
|
1360
1442
|
options = options || {};
|
|
1361
1443
|
callback = callback || function noop() { };
|
|
1444
|
+
// eslint-disable-next-line unicorn/prefer-spread
|
|
1362
1445
|
var ruleList = rules.concat(options.customRules || []);
|
|
1363
1446
|
var ruleErr = validateRuleList(ruleList);
|
|
1364
1447
|
if (ruleErr) {
|
|
@@ -1459,7 +1542,7 @@ function lintInput(options, synchronous, callback) {
|
|
|
1459
1542
|
function markdownlint(options, callback) {
|
|
1460
1543
|
return lintInput(options, false, callback);
|
|
1461
1544
|
}
|
|
1462
|
-
var markdownlintPromisify =
|
|
1545
|
+
var markdownlintPromisify = promisify && promisify(markdownlint);
|
|
1463
1546
|
/**
|
|
1464
1547
|
* Lint specified Markdown files.
|
|
1465
1548
|
*
|
|
@@ -1517,6 +1600,33 @@ function parseConfiguration(name, content, parsers) {
|
|
|
1517
1600
|
message: message
|
|
1518
1601
|
};
|
|
1519
1602
|
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Resolve referenced "extends" path in a configuration file
|
|
1605
|
+
* using path.resolve() with require.resolve() as a fallback.
|
|
1606
|
+
*
|
|
1607
|
+
* @param {string} configFile Configuration file name.
|
|
1608
|
+
* @param {string} referenceId Referenced identifier to resolve.
|
|
1609
|
+
* @returns {string} Resolved path to file.
|
|
1610
|
+
*/
|
|
1611
|
+
function resolveConfigExtends(configFile, referenceId) {
|
|
1612
|
+
var configFileDirname = path.dirname(configFile);
|
|
1613
|
+
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
|
1614
|
+
try {
|
|
1615
|
+
if (fs.statSync(resolvedExtendsFile).isFile()) {
|
|
1616
|
+
return resolvedExtendsFile;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
catch (_a) {
|
|
1620
|
+
// If not a file or fs.statSync throws, try require.resolve
|
|
1621
|
+
}
|
|
1622
|
+
try {
|
|
1623
|
+
return dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] });
|
|
1624
|
+
}
|
|
1625
|
+
catch (_b) {
|
|
1626
|
+
// If require.resolve throws, return resolvedExtendsFile
|
|
1627
|
+
}
|
|
1628
|
+
return resolvedExtendsFile;
|
|
1629
|
+
}
|
|
1520
1630
|
/**
|
|
1521
1631
|
* Read specified configuration file.
|
|
1522
1632
|
*
|
|
@@ -1547,8 +1657,8 @@ function readConfig(file, parsers, callback) {
|
|
|
1547
1657
|
var configExtends = config["extends"];
|
|
1548
1658
|
if (configExtends) {
|
|
1549
1659
|
delete config["extends"];
|
|
1550
|
-
var
|
|
1551
|
-
return readConfig(
|
|
1660
|
+
var resolvedExtends = resolveConfigExtends(file, configExtends);
|
|
1661
|
+
return readConfig(resolvedExtends, parsers, function (errr, extendsConfig) {
|
|
1552
1662
|
if (errr) {
|
|
1553
1663
|
return callback(errr);
|
|
1554
1664
|
}
|
|
@@ -1558,7 +1668,7 @@ function readConfig(file, parsers, callback) {
|
|
|
1558
1668
|
return callback(null, config);
|
|
1559
1669
|
});
|
|
1560
1670
|
}
|
|
1561
|
-
var readConfigPromisify =
|
|
1671
|
+
var readConfigPromisify = promisify && promisify(readConfig);
|
|
1562
1672
|
/**
|
|
1563
1673
|
* Read specified configuration file.
|
|
1564
1674
|
*
|
|
@@ -1590,24 +1700,43 @@ function readConfigSync(file, parsers) {
|
|
|
1590
1700
|
var configExtends = config["extends"];
|
|
1591
1701
|
if (configExtends) {
|
|
1592
1702
|
delete config["extends"];
|
|
1593
|
-
|
|
1703
|
+
var resolvedExtends = resolveConfigExtends(file, configExtends);
|
|
1704
|
+
return __assign(__assign({}, readConfigSync(resolvedExtends, parsers)), config);
|
|
1594
1705
|
}
|
|
1595
1706
|
return config;
|
|
1596
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Gets the (semantic) version of the library.
|
|
1710
|
+
*
|
|
1711
|
+
* @returns {string} SemVer string.
|
|
1712
|
+
*/
|
|
1713
|
+
function getVersion() {
|
|
1714
|
+
return __webpack_require__(/*! ../package.json */ "../package.json").version;
|
|
1715
|
+
}
|
|
1597
1716
|
// Export a/synchronous/Promise APIs
|
|
1598
1717
|
markdownlint.sync = markdownlintSync;
|
|
1599
1718
|
markdownlint.readConfig = readConfig;
|
|
1600
1719
|
markdownlint.readConfigSync = readConfigSync;
|
|
1720
|
+
markdownlint.getVersion = getVersion;
|
|
1601
1721
|
markdownlint.promises = {
|
|
1602
1722
|
"markdownlint": markdownlintPromise,
|
|
1603
1723
|
"readConfig": readConfigPromise
|
|
1604
1724
|
};
|
|
1605
1725
|
module.exports = markdownlint;
|
|
1606
1726
|
|
|
1607
|
-
|
|
1608
|
-
|
|
1727
|
+
|
|
1728
|
+
/***/ }),
|
|
1729
|
+
|
|
1730
|
+
/***/ "../lib/md001.js":
|
|
1731
|
+
/*!***********************!*\
|
|
1732
|
+
!*** ../lib/md001.js ***!
|
|
1733
|
+
\***********************/
|
|
1734
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1735
|
+
|
|
1609
1736
|
"use strict";
|
|
1610
|
-
|
|
1737
|
+
// @ts-check
|
|
1738
|
+
|
|
1739
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens;
|
|
1611
1740
|
module.exports = {
|
|
1612
1741
|
"names": ["MD001", "heading-increment", "header-increment"],
|
|
1613
1742
|
"description": "Heading levels should only increment by one level at a time",
|
|
@@ -1624,13 +1753,22 @@ module.exports = {
|
|
|
1624
1753
|
}
|
|
1625
1754
|
};
|
|
1626
1755
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1756
|
+
|
|
1757
|
+
/***/ }),
|
|
1758
|
+
|
|
1759
|
+
/***/ "../lib/md002.js":
|
|
1760
|
+
/*!***********************!*\
|
|
1761
|
+
!*** ../lib/md002.js ***!
|
|
1762
|
+
\***********************/
|
|
1763
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1764
|
+
|
|
1629
1765
|
"use strict";
|
|
1630
|
-
|
|
1766
|
+
// @ts-check
|
|
1767
|
+
|
|
1768
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
1631
1769
|
module.exports = {
|
|
1632
1770
|
"names": ["MD002", "first-heading-h1", "first-header-h1"],
|
|
1633
|
-
"description": "First heading should be a top
|
|
1771
|
+
"description": "First heading should be a top-level heading",
|
|
1634
1772
|
"tags": ["headings", "headers"],
|
|
1635
1773
|
"function": function MD002(params, onError) {
|
|
1636
1774
|
var level = Number(params.config.level || 1);
|
|
@@ -1645,10 +1783,19 @@ module.exports = {
|
|
|
1645
1783
|
}
|
|
1646
1784
|
};
|
|
1647
1785
|
|
|
1648
|
-
|
|
1649
|
-
|
|
1786
|
+
|
|
1787
|
+
/***/ }),
|
|
1788
|
+
|
|
1789
|
+
/***/ "../lib/md003.js":
|
|
1790
|
+
/*!***********************!*\
|
|
1791
|
+
!*** ../lib/md003.js ***!
|
|
1792
|
+
\***********************/
|
|
1793
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1794
|
+
|
|
1650
1795
|
"use strict";
|
|
1651
|
-
|
|
1796
|
+
// @ts-check
|
|
1797
|
+
|
|
1798
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
1652
1799
|
module.exports = {
|
|
1653
1800
|
"names": ["MD003", "heading-style", "header-style"],
|
|
1654
1801
|
"description": "Heading style",
|
|
@@ -1683,11 +1830,31 @@ module.exports = {
|
|
|
1683
1830
|
}
|
|
1684
1831
|
};
|
|
1685
1832
|
|
|
1686
|
-
|
|
1687
|
-
|
|
1833
|
+
|
|
1834
|
+
/***/ }),
|
|
1835
|
+
|
|
1836
|
+
/***/ "../lib/md004.js":
|
|
1837
|
+
/*!***********************!*\
|
|
1838
|
+
!*** ../lib/md004.js ***!
|
|
1839
|
+
\***********************/
|
|
1840
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1841
|
+
|
|
1688
1842
|
"use strict";
|
|
1689
|
-
|
|
1690
|
-
|
|
1843
|
+
// @ts-check
|
|
1844
|
+
|
|
1845
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, unorderedListStyleFor = _a.unorderedListStyleFor;
|
|
1846
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1847
|
+
var expectedStyleToMarker = {
|
|
1848
|
+
"dash": "-",
|
|
1849
|
+
"plus": "+",
|
|
1850
|
+
"asterisk": "*"
|
|
1851
|
+
};
|
|
1852
|
+
var differentItemStyle = {
|
|
1853
|
+
"dash": "plus",
|
|
1854
|
+
"plus": "asterisk",
|
|
1855
|
+
"asterisk": "dash"
|
|
1856
|
+
};
|
|
1857
|
+
var validStyles = Object.keys(expectedStyleToMarker);
|
|
1691
1858
|
module.exports = {
|
|
1692
1859
|
"names": ["MD004", "ul-style"],
|
|
1693
1860
|
"description": "Unordered list style",
|
|
@@ -1705,28 +1872,51 @@ module.exports = {
|
|
|
1705
1872
|
var itemStyle = unorderedListStyleFor(item);
|
|
1706
1873
|
if (style === "sublist") {
|
|
1707
1874
|
var nesting = list.nesting;
|
|
1708
|
-
if (!nestingStyles[nesting]
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
addErrorDetailIf(onError, item.lineNumber, nestingStyles[nesting], itemStyle, null, null, rangeFromRegExp(item.line, listItemMarkerRe));
|
|
1875
|
+
if (!nestingStyles[nesting]) {
|
|
1876
|
+
nestingStyles[nesting] =
|
|
1877
|
+
(itemStyle === nestingStyles[nesting - 1]) ?
|
|
1878
|
+
differentItemStyle[itemStyle] :
|
|
1879
|
+
itemStyle;
|
|
1714
1880
|
}
|
|
1881
|
+
expectedStyle = nestingStyles[nesting];
|
|
1715
1882
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1883
|
+
if (!validStyles.includes(expectedStyle)) {
|
|
1884
|
+
expectedStyle = validStyles[0];
|
|
1885
|
+
}
|
|
1886
|
+
var range = null;
|
|
1887
|
+
var fixInfo = null;
|
|
1888
|
+
var match = item.line.match(listItemMarkerRe);
|
|
1889
|
+
if (match) {
|
|
1890
|
+
var column = match.index + 1;
|
|
1891
|
+
var length_1 = match[0].length;
|
|
1892
|
+
range = [column, length_1];
|
|
1893
|
+
fixInfo = {
|
|
1894
|
+
"editColumn": match[1].length + 1,
|
|
1895
|
+
"deleteCount": 1,
|
|
1896
|
+
"insertText": expectedStyleToMarker[expectedStyle]
|
|
1897
|
+
};
|
|
1718
1898
|
}
|
|
1899
|
+
addErrorDetailIf(onError, item.lineNumber, expectedStyle, itemStyle, null, null, range, fixInfo);
|
|
1719
1900
|
});
|
|
1720
1901
|
}
|
|
1721
1902
|
});
|
|
1722
1903
|
}
|
|
1723
1904
|
};
|
|
1724
1905
|
|
|
1725
|
-
|
|
1726
|
-
|
|
1906
|
+
|
|
1907
|
+
/***/ }),
|
|
1908
|
+
|
|
1909
|
+
/***/ "../lib/md005.js":
|
|
1910
|
+
/*!***********************!*\
|
|
1911
|
+
!*** ../lib/md005.js ***!
|
|
1912
|
+
\***********************/
|
|
1913
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1914
|
+
|
|
1727
1915
|
"use strict";
|
|
1728
|
-
|
|
1729
|
-
|
|
1916
|
+
// @ts-check
|
|
1917
|
+
|
|
1918
|
+
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;
|
|
1919
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1730
1920
|
module.exports = {
|
|
1731
1921
|
"names": ["MD005", "list-indent"],
|
|
1732
1922
|
"description": "Inconsistent indentation for list items at the same level",
|
|
@@ -1777,11 +1967,20 @@ module.exports = {
|
|
|
1777
1967
|
}
|
|
1778
1968
|
};
|
|
1779
1969
|
|
|
1780
|
-
|
|
1781
|
-
|
|
1970
|
+
|
|
1971
|
+
/***/ }),
|
|
1972
|
+
|
|
1973
|
+
/***/ "../lib/md006.js":
|
|
1974
|
+
/*!***********************!*\
|
|
1975
|
+
!*** ../lib/md006.js ***!
|
|
1976
|
+
\***********************/
|
|
1977
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1978
|
+
|
|
1782
1979
|
"use strict";
|
|
1783
|
-
|
|
1784
|
-
|
|
1980
|
+
// @ts-check
|
|
1981
|
+
|
|
1982
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, rangeFromRegExp = _a.rangeFromRegExp;
|
|
1983
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1785
1984
|
module.exports = {
|
|
1786
1985
|
"names": ["MD006", "ul-start-left"],
|
|
1787
1986
|
"description": "Consider starting bulleted lists at the beginning of the line",
|
|
@@ -1792,7 +1991,7 @@ module.exports = {
|
|
|
1792
1991
|
list.items.forEach(function (item) {
|
|
1793
1992
|
var lineNumber = item.lineNumber, line = item.line;
|
|
1794
1993
|
addErrorDetailIf(onError, lineNumber, 0, list.indent, null, null, rangeFromRegExp(line, listItemMarkerRe), {
|
|
1795
|
-
"deleteCount": line.length - line.
|
|
1994
|
+
"deleteCount": line.length - line.trimStart().length
|
|
1796
1995
|
});
|
|
1797
1996
|
});
|
|
1798
1997
|
}
|
|
@@ -1800,11 +1999,20 @@ module.exports = {
|
|
|
1800
1999
|
}
|
|
1801
2000
|
};
|
|
1802
2001
|
|
|
1803
|
-
|
|
1804
|
-
|
|
2002
|
+
|
|
2003
|
+
/***/ }),
|
|
2004
|
+
|
|
2005
|
+
/***/ "../lib/md007.js":
|
|
2006
|
+
/*!***********************!*\
|
|
2007
|
+
!*** ../lib/md007.js ***!
|
|
2008
|
+
\***********************/
|
|
2009
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2010
|
+
|
|
1805
2011
|
"use strict";
|
|
1806
|
-
|
|
1807
|
-
|
|
2012
|
+
// @ts-check
|
|
2013
|
+
|
|
2014
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, indentFor = _a.indentFor, listItemMarkerRe = _a.listItemMarkerRe;
|
|
2015
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
1808
2016
|
module.exports = {
|
|
1809
2017
|
"names": ["MD007", "ul-indent"],
|
|
1810
2018
|
"description": "Unordered list indentation",
|
|
@@ -1837,11 +2045,20 @@ module.exports = {
|
|
|
1837
2045
|
}
|
|
1838
2046
|
};
|
|
1839
2047
|
|
|
1840
|
-
|
|
1841
|
-
|
|
2048
|
+
|
|
2049
|
+
/***/ }),
|
|
2050
|
+
|
|
2051
|
+
/***/ "../lib/md009.js":
|
|
2052
|
+
/*!***********************!*\
|
|
2053
|
+
!*** ../lib/md009.js ***!
|
|
2054
|
+
\***********************/
|
|
2055
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2056
|
+
|
|
1842
2057
|
"use strict";
|
|
1843
|
-
|
|
1844
|
-
|
|
2058
|
+
// @ts-check
|
|
2059
|
+
|
|
2060
|
+
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;
|
|
2061
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1845
2062
|
module.exports = {
|
|
1846
2063
|
"names": ["MD009", "no-trailing-spaces"],
|
|
1847
2064
|
"description": "Trailing spaces",
|
|
@@ -1883,34 +2100,41 @@ module.exports = {
|
|
|
1883
2100
|
codeInlineLineNumbers.sort(numericSortAscending);
|
|
1884
2101
|
}
|
|
1885
2102
|
var expected = (brSpaces < 2) ? 0 : brSpaces;
|
|
1886
|
-
|
|
1887
|
-
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
|
1888
|
-
inFencedCode += onFence;
|
|
2103
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
1889
2104
|
var lineNumber = lineIndex + 1;
|
|
1890
|
-
var trailingSpaces = line.length - line.
|
|
1891
|
-
if (
|
|
1892
|
-
!
|
|
1893
|
-
|
|
2105
|
+
var trailingSpaces = line.length - line.trimEnd().length;
|
|
2106
|
+
if (trailingSpaces &&
|
|
2107
|
+
!inCode &&
|
|
2108
|
+
!includesSorted(listItemLineNumbers, lineNumber) &&
|
|
2109
|
+
((expected !== trailingSpaces) ||
|
|
1894
2110
|
(strict &&
|
|
1895
2111
|
(!includesSorted(paragraphLineNumbers, lineNumber) ||
|
|
1896
|
-
includesSorted(codeInlineLineNumbers, lineNumber)))) {
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
}
|
|
2112
|
+
includesSorted(codeInlineLineNumbers, lineNumber))))) {
|
|
2113
|
+
var column = line.length - trailingSpaces + 1;
|
|
2114
|
+
addError(onError, lineNumber, "Expected: " + (expected === 0 ? "" : "0 or ") +
|
|
2115
|
+
expected + "; Actual: " + trailingSpaces, null, [column, trailingSpaces], {
|
|
2116
|
+
"editColumn": column,
|
|
2117
|
+
"deleteCount": trailingSpaces
|
|
2118
|
+
});
|
|
1904
2119
|
}
|
|
1905
2120
|
});
|
|
1906
2121
|
}
|
|
1907
2122
|
};
|
|
1908
2123
|
|
|
1909
|
-
|
|
1910
|
-
|
|
2124
|
+
|
|
2125
|
+
/***/ }),
|
|
2126
|
+
|
|
2127
|
+
/***/ "../lib/md010.js":
|
|
2128
|
+
/*!***********************!*\
|
|
2129
|
+
!*** ../lib/md010.js ***!
|
|
2130
|
+
\***********************/
|
|
2131
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2132
|
+
|
|
1911
2133
|
"use strict";
|
|
1912
|
-
|
|
1913
|
-
|
|
2134
|
+
// @ts-check
|
|
2135
|
+
|
|
2136
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine;
|
|
2137
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1914
2138
|
var tabRe = /\t+/g;
|
|
1915
2139
|
module.exports = {
|
|
1916
2140
|
"names": ["MD010", "no-hard-tabs"],
|
|
@@ -1936,10 +2160,19 @@ module.exports = {
|
|
|
1936
2160
|
}
|
|
1937
2161
|
};
|
|
1938
2162
|
|
|
1939
|
-
|
|
1940
|
-
|
|
2163
|
+
|
|
2164
|
+
/***/ }),
|
|
2165
|
+
|
|
2166
|
+
/***/ "../lib/md011.js":
|
|
2167
|
+
/*!***********************!*\
|
|
2168
|
+
!*** ../lib/md011.js ***!
|
|
2169
|
+
\***********************/
|
|
2170
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2171
|
+
|
|
1941
2172
|
"use strict";
|
|
1942
|
-
|
|
2173
|
+
// @ts-check
|
|
2174
|
+
|
|
2175
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachInlineChild = _a.forEachInlineChild, unescapeMarkdown = _a.unescapeMarkdown;
|
|
1943
2176
|
var reversedLinkRe = /\(([^)]+)\)\[([^\]^][^\]]*)]/g;
|
|
1944
2177
|
module.exports = {
|
|
1945
2178
|
"names": ["MD011", "no-reversed-links"],
|
|
@@ -1954,21 +2187,34 @@ module.exports = {
|
|
|
1954
2187
|
var line = params.lines[lineNumber - 1];
|
|
1955
2188
|
var column = unescapeMarkdown(line).indexOf(reversedLink) + 1;
|
|
1956
2189
|
var length_1 = reversedLink.length;
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
2190
|
+
var range = column ? [column, length_1] : null;
|
|
2191
|
+
var fixInfo = column ?
|
|
2192
|
+
{
|
|
2193
|
+
"editColumn": column,
|
|
2194
|
+
"deleteCount": length_1,
|
|
2195
|
+
"insertText": "[" + linkText + "](" + linkDestination + ")"
|
|
2196
|
+
} :
|
|
2197
|
+
null;
|
|
2198
|
+
addError(onError, lineNumber, reversedLink, null, range, fixInfo);
|
|
1962
2199
|
}
|
|
1963
2200
|
});
|
|
1964
2201
|
}
|
|
1965
2202
|
};
|
|
1966
2203
|
|
|
1967
|
-
|
|
1968
|
-
|
|
2204
|
+
|
|
2205
|
+
/***/ }),
|
|
2206
|
+
|
|
2207
|
+
/***/ "../lib/md012.js":
|
|
2208
|
+
/*!***********************!*\
|
|
2209
|
+
!*** ../lib/md012.js ***!
|
|
2210
|
+
\***********************/
|
|
2211
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2212
|
+
|
|
1969
2213
|
"use strict";
|
|
1970
|
-
|
|
1971
|
-
|
|
2214
|
+
// @ts-check
|
|
2215
|
+
|
|
2216
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, forEachLine = _a.forEachLine;
|
|
2217
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1972
2218
|
module.exports = {
|
|
1973
2219
|
"names": ["MD012", "no-multiple-blanks"],
|
|
1974
2220
|
"description": "Multiple consecutive blank lines",
|
|
@@ -1987,11 +2233,20 @@ module.exports = {
|
|
|
1987
2233
|
}
|
|
1988
2234
|
};
|
|
1989
2235
|
|
|
1990
|
-
|
|
1991
|
-
|
|
2236
|
+
|
|
2237
|
+
/***/ }),
|
|
2238
|
+
|
|
2239
|
+
/***/ "../lib/md013.js":
|
|
2240
|
+
/*!***********************!*\
|
|
2241
|
+
!*** ../lib/md013.js ***!
|
|
2242
|
+
\***********************/
|
|
2243
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2244
|
+
|
|
1992
2245
|
"use strict";
|
|
1993
|
-
|
|
1994
|
-
|
|
2246
|
+
// @ts-check
|
|
2247
|
+
|
|
2248
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, forEachHeading = _a.forEachHeading, forEachLine = _a.forEachLine, includesSorted = _a.includesSorted;
|
|
2249
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
1995
2250
|
var longLineRePrefix = "^.{";
|
|
1996
2251
|
var longLineRePostfixRelaxed = "}.*\\s.*$";
|
|
1997
2252
|
var longLineRePostfixStrict = "}.+$";
|
|
@@ -2070,10 +2325,19 @@ module.exports = {
|
|
|
2070
2325
|
}
|
|
2071
2326
|
};
|
|
2072
2327
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2328
|
+
|
|
2329
|
+
/***/ }),
|
|
2330
|
+
|
|
2331
|
+
/***/ "../lib/md014.js":
|
|
2332
|
+
/*!***********************!*\
|
|
2333
|
+
!*** ../lib/md014.js ***!
|
|
2334
|
+
\***********************/
|
|
2335
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2336
|
+
|
|
2075
2337
|
"use strict";
|
|
2076
|
-
|
|
2338
|
+
// @ts-check
|
|
2339
|
+
|
|
2340
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
2077
2341
|
var dollarCommandRe = /^(\s*)(\$\s+)/;
|
|
2078
2342
|
module.exports = {
|
|
2079
2343
|
"names": ["MD014", "commands-show-output"],
|
|
@@ -2114,11 +2378,20 @@ module.exports = {
|
|
|
2114
2378
|
}
|
|
2115
2379
|
};
|
|
2116
2380
|
|
|
2117
|
-
|
|
2118
|
-
|
|
2381
|
+
|
|
2382
|
+
/***/ }),
|
|
2383
|
+
|
|
2384
|
+
/***/ "../lib/md018.js":
|
|
2385
|
+
/*!***********************!*\
|
|
2386
|
+
!*** ../lib/md018.js ***!
|
|
2387
|
+
\***********************/
|
|
2388
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2389
|
+
|
|
2119
2390
|
"use strict";
|
|
2120
|
-
|
|
2121
|
-
|
|
2391
|
+
// @ts-check
|
|
2392
|
+
|
|
2393
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine;
|
|
2394
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2122
2395
|
module.exports = {
|
|
2123
2396
|
"names": ["MD018", "no-missing-space-atx"],
|
|
2124
2397
|
"description": "No space after hash on atx style heading",
|
|
@@ -2126,7 +2399,7 @@ module.exports = {
|
|
|
2126
2399
|
"function": function MD018(params, onError) {
|
|
2127
2400
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
2128
2401
|
if (!inCode &&
|
|
2129
|
-
/^#+[
|
|
2402
|
+
/^#+[^# \t]/.test(line) &&
|
|
2130
2403
|
!/#\s*$/.test(line) &&
|
|
2131
2404
|
!line.startsWith("#️⃣")) {
|
|
2132
2405
|
var hashCount = /^#+/.exec(line)[0].length;
|
|
@@ -2139,10 +2412,19 @@ module.exports = {
|
|
|
2139
2412
|
}
|
|
2140
2413
|
};
|
|
2141
2414
|
|
|
2142
|
-
|
|
2143
|
-
|
|
2415
|
+
|
|
2416
|
+
/***/ }),
|
|
2417
|
+
|
|
2418
|
+
/***/ "../lib/md019.js":
|
|
2419
|
+
/*!***********************!*\
|
|
2420
|
+
!*** ../lib/md019.js ***!
|
|
2421
|
+
\***********************/
|
|
2422
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2423
|
+
|
|
2144
2424
|
"use strict";
|
|
2145
|
-
|
|
2425
|
+
// @ts-check
|
|
2426
|
+
|
|
2427
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
2146
2428
|
module.exports = {
|
|
2147
2429
|
"names": ["MD019", "no-multiple-space-atx"],
|
|
2148
2430
|
"description": "Multiple spaces after hash on atx style heading",
|
|
@@ -2151,7 +2433,7 @@ module.exports = {
|
|
|
2151
2433
|
filterTokens(params, "heading_open", function (token) {
|
|
2152
2434
|
if (headingStyleFor(token) === "atx") {
|
|
2153
2435
|
var line = token.line, lineNumber = token.lineNumber;
|
|
2154
|
-
var match = /^(#+)(\
|
|
2436
|
+
var match = /^(#+)([ \t]{2,})(?:\S)/.exec(line);
|
|
2155
2437
|
if (match) {
|
|
2156
2438
|
var hashLength = match[1]["length"], spacesLength = match[2]["length"];
|
|
2157
2439
|
addErrorContext(onError, lineNumber, line.trim(), null, null, [1, hashLength + spacesLength + 1], {
|
|
@@ -2164,11 +2446,20 @@ module.exports = {
|
|
|
2164
2446
|
}
|
|
2165
2447
|
};
|
|
2166
2448
|
|
|
2167
|
-
|
|
2168
|
-
|
|
2449
|
+
|
|
2450
|
+
/***/ }),
|
|
2451
|
+
|
|
2452
|
+
/***/ "../lib/md020.js":
|
|
2453
|
+
/*!***********************!*\
|
|
2454
|
+
!*** ../lib/md020.js ***!
|
|
2455
|
+
\***********************/
|
|
2456
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2457
|
+
|
|
2169
2458
|
"use strict";
|
|
2170
|
-
|
|
2171
|
-
|
|
2459
|
+
// @ts-check
|
|
2460
|
+
|
|
2461
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine;
|
|
2462
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2172
2463
|
module.exports = {
|
|
2173
2464
|
"names": ["MD020", "no-missing-space-closed-atx"],
|
|
2174
2465
|
"description": "No space inside hashes on closed atx style heading",
|
|
@@ -2176,7 +2467,7 @@ module.exports = {
|
|
|
2176
2467
|
"function": function MD020(params, onError) {
|
|
2177
2468
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
|
2178
2469
|
if (!inCode) {
|
|
2179
|
-
var match = /^(#+)(\
|
|
2470
|
+
var match = /^(#+)([ \t]*)([^#]*?[^#\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
|
2180
2471
|
if (match) {
|
|
2181
2472
|
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"];
|
|
2182
2473
|
var leftHashLength = leftHash.length;
|
|
@@ -2206,10 +2497,19 @@ module.exports = {
|
|
|
2206
2497
|
}
|
|
2207
2498
|
};
|
|
2208
2499
|
|
|
2209
|
-
|
|
2210
|
-
|
|
2500
|
+
|
|
2501
|
+
/***/ }),
|
|
2502
|
+
|
|
2503
|
+
/***/ "../lib/md021.js":
|
|
2504
|
+
/*!***********************!*\
|
|
2505
|
+
!*** ../lib/md021.js ***!
|
|
2506
|
+
\***********************/
|
|
2507
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2508
|
+
|
|
2211
2509
|
"use strict";
|
|
2212
|
-
|
|
2510
|
+
// @ts-check
|
|
2511
|
+
|
|
2512
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, headingStyleFor = _a.headingStyleFor;
|
|
2213
2513
|
module.exports = {
|
|
2214
2514
|
"names": ["MD021", "no-multiple-space-closed-atx"],
|
|
2215
2515
|
"description": "Multiple spaces inside hashes on closed atx style heading",
|
|
@@ -2218,7 +2518,7 @@ module.exports = {
|
|
|
2218
2518
|
filterTokens(params, "heading_open", function (token) {
|
|
2219
2519
|
if (headingStyleFor(token) === "atx_closed") {
|
|
2220
2520
|
var line = token.line, lineNumber = token.lineNumber;
|
|
2221
|
-
var match = /^(#+)(\
|
|
2521
|
+
var match = /^(#+)([ \t]+)([^#]+?)([ \t]+)(#+)(\s*)$/.exec(line);
|
|
2222
2522
|
if (match) {
|
|
2223
2523
|
var leftHash = match[1], leftSpaceLength = match[2]["length"], content = match[3], rightSpaceLength = match[4]["length"], rightHash = match[5], trailSpaceLength = match[6]["length"];
|
|
2224
2524
|
var left = leftSpaceLength > 1;
|
|
@@ -2248,10 +2548,19 @@ module.exports = {
|
|
|
2248
2548
|
}
|
|
2249
2549
|
};
|
|
2250
2550
|
|
|
2251
|
-
|
|
2252
|
-
|
|
2551
|
+
|
|
2552
|
+
/***/ }),
|
|
2553
|
+
|
|
2554
|
+
/***/ "../lib/md022.js":
|
|
2555
|
+
/*!***********************!*\
|
|
2556
|
+
!*** ../lib/md022.js ***!
|
|
2557
|
+
\***********************/
|
|
2558
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2559
|
+
|
|
2253
2560
|
"use strict";
|
|
2254
|
-
|
|
2561
|
+
// @ts-check
|
|
2562
|
+
|
|
2563
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens, isBlankLine = _a.isBlankLine;
|
|
2255
2564
|
module.exports = {
|
|
2256
2565
|
"names": ["MD022", "blanks-around-headings", "blanks-around-headers"],
|
|
2257
2566
|
"description": "Headings should be surrounded by blank lines",
|
|
@@ -2287,10 +2596,19 @@ module.exports = {
|
|
|
2287
2596
|
}
|
|
2288
2597
|
};
|
|
2289
2598
|
|
|
2290
|
-
|
|
2291
|
-
|
|
2599
|
+
|
|
2600
|
+
/***/ }),
|
|
2601
|
+
|
|
2602
|
+
/***/ "../lib/md023.js":
|
|
2603
|
+
/*!***********************!*\
|
|
2604
|
+
!*** ../lib/md023.js ***!
|
|
2605
|
+
\***********************/
|
|
2606
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2607
|
+
|
|
2292
2608
|
"use strict";
|
|
2293
|
-
|
|
2609
|
+
// @ts-check
|
|
2610
|
+
|
|
2611
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
2294
2612
|
var spaceBeforeHeadingRe = /^((?:\s+)|(?:[>\s]+\s\s))[^>\s]/;
|
|
2295
2613
|
module.exports = {
|
|
2296
2614
|
"names": ["MD023", "heading-start-left", "header-start-left"],
|
|
@@ -2303,7 +2621,7 @@ module.exports = {
|
|
|
2303
2621
|
if (match) {
|
|
2304
2622
|
var prefixAndFirstChar = match[0], prefix = match[1];
|
|
2305
2623
|
var deleteCount = prefix.length;
|
|
2306
|
-
var prefixLengthNoSpace = prefix.
|
|
2624
|
+
var prefixLengthNoSpace = prefix.trimEnd().length;
|
|
2307
2625
|
if (prefixLengthNoSpace) {
|
|
2308
2626
|
deleteCount -= prefixLengthNoSpace - 1;
|
|
2309
2627
|
}
|
|
@@ -2316,10 +2634,19 @@ module.exports = {
|
|
|
2316
2634
|
}
|
|
2317
2635
|
};
|
|
2318
2636
|
|
|
2319
|
-
|
|
2320
|
-
|
|
2637
|
+
|
|
2638
|
+
/***/ }),
|
|
2639
|
+
|
|
2640
|
+
/***/ "../lib/md024.js":
|
|
2641
|
+
/*!***********************!*\
|
|
2642
|
+
!*** ../lib/md024.js ***!
|
|
2643
|
+
\***********************/
|
|
2644
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2645
|
+
|
|
2321
2646
|
"use strict";
|
|
2322
|
-
|
|
2647
|
+
// @ts-check
|
|
2648
|
+
|
|
2649
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachHeading = _a.forEachHeading;
|
|
2323
2650
|
module.exports = {
|
|
2324
2651
|
"names": ["MD024", "no-duplicate-heading", "no-duplicate-header"],
|
|
2325
2652
|
"description": "Multiple headings with the same content",
|
|
@@ -2353,13 +2680,22 @@ module.exports = {
|
|
|
2353
2680
|
}
|
|
2354
2681
|
};
|
|
2355
2682
|
|
|
2356
|
-
|
|
2357
|
-
|
|
2683
|
+
|
|
2684
|
+
/***/ }),
|
|
2685
|
+
|
|
2686
|
+
/***/ "../lib/md025.js":
|
|
2687
|
+
/*!***********************!*\
|
|
2688
|
+
!*** ../lib/md025.js ***!
|
|
2689
|
+
\***********************/
|
|
2690
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2691
|
+
|
|
2358
2692
|
"use strict";
|
|
2359
|
-
|
|
2693
|
+
// @ts-check
|
|
2694
|
+
|
|
2695
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, frontMatterHasTitle = _a.frontMatterHasTitle;
|
|
2360
2696
|
module.exports = {
|
|
2361
2697
|
"names": ["MD025", "single-title", "single-h1"],
|
|
2362
|
-
"description": "Multiple top
|
|
2698
|
+
"description": "Multiple top-level headings in the same document",
|
|
2363
2699
|
"tags": ["headings", "headers"],
|
|
2364
2700
|
"function": function MD025(params, onError) {
|
|
2365
2701
|
var level = Number(params.config.level || 1);
|
|
@@ -2379,24 +2715,33 @@ module.exports = {
|
|
|
2379
2715
|
}
|
|
2380
2716
|
};
|
|
2381
2717
|
|
|
2382
|
-
|
|
2383
|
-
|
|
2718
|
+
|
|
2719
|
+
/***/ }),
|
|
2720
|
+
|
|
2721
|
+
/***/ "../lib/md026.js":
|
|
2722
|
+
/*!***********************!*\
|
|
2723
|
+
!*** ../lib/md026.js ***!
|
|
2724
|
+
\***********************/
|
|
2725
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2726
|
+
|
|
2384
2727
|
"use strict";
|
|
2385
|
-
|
|
2728
|
+
// @ts-check
|
|
2729
|
+
|
|
2730
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, allPunctuationNoQuestion = _a.allPunctuationNoQuestion, escapeForRegExp = _a.escapeForRegExp, forEachHeading = _a.forEachHeading;
|
|
2731
|
+
var endOfLineHtmlEntityRe = /&#?[0-9a-zA-Z]+;$/;
|
|
2386
2732
|
module.exports = {
|
|
2387
2733
|
"names": ["MD026", "no-trailing-punctuation"],
|
|
2388
2734
|
"description": "Trailing punctuation in heading",
|
|
2389
2735
|
"tags": ["headings", "headers"],
|
|
2390
2736
|
"function": function MD026(params, onError) {
|
|
2391
2737
|
var punctuation = params.config.punctuation;
|
|
2392
|
-
punctuation =
|
|
2393
|
-
String((punctuation === undefined) ? allPunctuation : punctuation);
|
|
2738
|
+
punctuation = String((punctuation === undefined) ? allPunctuationNoQuestion : punctuation);
|
|
2394
2739
|
var trailingPunctuationRe = new RegExp("\\s*[" + escapeForRegExp(punctuation) + "]+$");
|
|
2395
2740
|
forEachHeading(params, function (heading) {
|
|
2396
2741
|
var line = heading.line, lineNumber = heading.lineNumber;
|
|
2397
2742
|
var trimmedLine = line.replace(/[\s#]*$/, "");
|
|
2398
2743
|
var match = trailingPunctuationRe.exec(trimmedLine);
|
|
2399
|
-
if (match) {
|
|
2744
|
+
if (match && !endOfLineHtmlEntityRe.test(trimmedLine)) {
|
|
2400
2745
|
var fullMatch = match[0];
|
|
2401
2746
|
var column = match.index + 1;
|
|
2402
2747
|
var length_1 = fullMatch.length;
|
|
@@ -2409,10 +2754,19 @@ module.exports = {
|
|
|
2409
2754
|
}
|
|
2410
2755
|
};
|
|
2411
2756
|
|
|
2412
|
-
|
|
2413
|
-
|
|
2757
|
+
|
|
2758
|
+
/***/ }),
|
|
2759
|
+
|
|
2760
|
+
/***/ "../lib/md027.js":
|
|
2761
|
+
/*!***********************!*\
|
|
2762
|
+
!*** ../lib/md027.js ***!
|
|
2763
|
+
\***********************/
|
|
2764
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2765
|
+
|
|
2414
2766
|
"use strict";
|
|
2415
|
-
|
|
2767
|
+
// @ts-check
|
|
2768
|
+
|
|
2769
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, newLineRe = _a.newLineRe;
|
|
2416
2770
|
var spaceAfterBlockQuoteRe = /^((?:\s*>)+)(\s{2,})\S/;
|
|
2417
2771
|
module.exports = {
|
|
2418
2772
|
"names": ["MD027", "no-multiple-space-blockquote"],
|
|
@@ -2455,10 +2809,19 @@ module.exports = {
|
|
|
2455
2809
|
}
|
|
2456
2810
|
};
|
|
2457
2811
|
|
|
2458
|
-
|
|
2459
|
-
|
|
2812
|
+
|
|
2813
|
+
/***/ }),
|
|
2814
|
+
|
|
2815
|
+
/***/ "../lib/md028.js":
|
|
2816
|
+
/*!***********************!*\
|
|
2817
|
+
!*** ../lib/md028.js ***!
|
|
2818
|
+
\***********************/
|
|
2819
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2820
|
+
|
|
2460
2821
|
"use strict";
|
|
2461
|
-
|
|
2822
|
+
// @ts-check
|
|
2823
|
+
|
|
2824
|
+
var addError = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addError;
|
|
2462
2825
|
module.exports = {
|
|
2463
2826
|
"names": ["MD028", "no-blanks-blockquote"],
|
|
2464
2827
|
"description": "Blank line inside blockquote",
|
|
@@ -2470,9 +2833,7 @@ module.exports = {
|
|
|
2470
2833
|
if ((token.type === "blockquote_open") &&
|
|
2471
2834
|
(prevToken.type === "blockquote_close")) {
|
|
2472
2835
|
for (var lineNumber = prevLineNumber; lineNumber < token.lineNumber; lineNumber++) {
|
|
2473
|
-
addError(onError, lineNumber
|
|
2474
|
-
"deleteCount": -1
|
|
2475
|
-
});
|
|
2836
|
+
addError(onError, lineNumber);
|
|
2476
2837
|
}
|
|
2477
2838
|
}
|
|
2478
2839
|
prevToken = token;
|
|
@@ -2483,11 +2844,20 @@ module.exports = {
|
|
|
2483
2844
|
}
|
|
2484
2845
|
};
|
|
2485
2846
|
|
|
2486
|
-
|
|
2487
|
-
|
|
2847
|
+
|
|
2848
|
+
/***/ }),
|
|
2849
|
+
|
|
2850
|
+
/***/ "../lib/md029.js":
|
|
2851
|
+
/*!***********************!*\
|
|
2852
|
+
!*** ../lib/md029.js ***!
|
|
2853
|
+
\***********************/
|
|
2854
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2855
|
+
|
|
2488
2856
|
"use strict";
|
|
2489
|
-
|
|
2490
|
-
|
|
2857
|
+
// @ts-check
|
|
2858
|
+
|
|
2859
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, listItemMarkerRe = _a.listItemMarkerRe, orderedListItemMarkerRe = _a.orderedListItemMarkerRe, rangeFromRegExp = _a.rangeFromRegExp;
|
|
2860
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2491
2861
|
var listStyleExamples = {
|
|
2492
2862
|
"one": "1/1/1",
|
|
2493
2863
|
"ordered": "1/2/3",
|
|
@@ -2544,11 +2914,20 @@ module.exports = {
|
|
|
2544
2914
|
}
|
|
2545
2915
|
};
|
|
2546
2916
|
|
|
2547
|
-
|
|
2548
|
-
|
|
2917
|
+
|
|
2918
|
+
/***/ }),
|
|
2919
|
+
|
|
2920
|
+
/***/ "../lib/md030.js":
|
|
2921
|
+
/*!***********************!*\
|
|
2922
|
+
!*** ../lib/md030.js ***!
|
|
2923
|
+
\***********************/
|
|
2924
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2925
|
+
|
|
2549
2926
|
"use strict";
|
|
2550
|
-
|
|
2551
|
-
|
|
2927
|
+
// @ts-check
|
|
2928
|
+
|
|
2929
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
2930
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2552
2931
|
module.exports = {
|
|
2553
2932
|
"names": ["MD030", "list-marker-space"],
|
|
2554
2933
|
"description": "Spaces after list markers",
|
|
@@ -2584,11 +2963,20 @@ module.exports = {
|
|
|
2584
2963
|
}
|
|
2585
2964
|
};
|
|
2586
2965
|
|
|
2587
|
-
|
|
2588
|
-
|
|
2966
|
+
|
|
2967
|
+
/***/ }),
|
|
2968
|
+
|
|
2969
|
+
/***/ "../lib/md031.js":
|
|
2970
|
+
/*!***********************!*\
|
|
2971
|
+
!*** ../lib/md031.js ***!
|
|
2972
|
+
\***********************/
|
|
2973
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2974
|
+
|
|
2589
2975
|
"use strict";
|
|
2590
|
-
|
|
2591
|
-
|
|
2976
|
+
// @ts-check
|
|
2977
|
+
|
|
2978
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, forEachLine = _a.forEachLine, isBlankLine = _a.isBlankLine;
|
|
2979
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2592
2980
|
var codeFencePrefixRe = /^(.*?)\s*[`~]/;
|
|
2593
2981
|
module.exports = {
|
|
2594
2982
|
"names": ["MD031", "blanks-around-fences"],
|
|
@@ -2604,21 +2992,31 @@ module.exports = {
|
|
|
2604
2992
|
if ((includeListItems || !inItem) &&
|
|
2605
2993
|
((onTopFence && !isBlankLine(lines[i - 1])) ||
|
|
2606
2994
|
(onBottomFence && !isBlankLine(lines[i + 1])))) {
|
|
2607
|
-
var _a = line.match(codeFencePrefixRe), prefix = _a[1];
|
|
2608
|
-
|
|
2995
|
+
var _a = line.match(codeFencePrefixRe) || [], prefix = _a[1];
|
|
2996
|
+
var fixInfo = (prefix === undefined) ? null : {
|
|
2609
2997
|
"lineNumber": i + (onTopFence ? 1 : 2),
|
|
2610
2998
|
"insertText": prefix + "\n"
|
|
2611
|
-
}
|
|
2999
|
+
};
|
|
3000
|
+
addErrorContext(onError, i + 1, lines[i].trim(), null, null, null, fixInfo);
|
|
2612
3001
|
}
|
|
2613
3002
|
});
|
|
2614
3003
|
}
|
|
2615
3004
|
};
|
|
2616
3005
|
|
|
2617
|
-
|
|
2618
|
-
|
|
3006
|
+
|
|
3007
|
+
/***/ }),
|
|
3008
|
+
|
|
3009
|
+
/***/ "../lib/md032.js":
|
|
3010
|
+
/*!***********************!*\
|
|
3011
|
+
!*** ../lib/md032.js ***!
|
|
3012
|
+
\***********************/
|
|
3013
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3014
|
+
|
|
2619
3015
|
"use strict";
|
|
2620
|
-
|
|
2621
|
-
|
|
3016
|
+
// @ts-check
|
|
3017
|
+
|
|
3018
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, isBlankLine = _a.isBlankLine;
|
|
3019
|
+
var flattenedLists = __webpack_require__(/*! ./cache */ "../lib/cache.js").flattenedLists;
|
|
2622
3020
|
var quotePrefixRe = /^[>\s]*/;
|
|
2623
3021
|
module.exports = {
|
|
2624
3022
|
"names": ["MD032", "blanks-around-lists"],
|
|
@@ -2630,7 +3028,7 @@ module.exports = {
|
|
|
2630
3028
|
var firstIndex = list.open.map[0];
|
|
2631
3029
|
if (!isBlankLine(lines[firstIndex - 1])) {
|
|
2632
3030
|
var line = lines[firstIndex];
|
|
2633
|
-
var quotePrefix = line.match(quotePrefixRe)[0].
|
|
3031
|
+
var quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
|
|
2634
3032
|
addErrorContext(onError, firstIndex + 1, line.trim(), null, null, null, {
|
|
2635
3033
|
"insertText": quotePrefix + "\n"
|
|
2636
3034
|
});
|
|
@@ -2638,7 +3036,7 @@ module.exports = {
|
|
|
2638
3036
|
var lastIndex = list.lastLineIndex - 1;
|
|
2639
3037
|
if (!isBlankLine(lines[lastIndex + 1])) {
|
|
2640
3038
|
var line = lines[lastIndex];
|
|
2641
|
-
var quotePrefix = line.match(quotePrefixRe)[0].
|
|
3039
|
+
var quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
|
|
2642
3040
|
addErrorContext(onError, lastIndex + 1, line.trim(), null, null, null, {
|
|
2643
3041
|
"lineNumber": lastIndex + 2,
|
|
2644
3042
|
"insertText": quotePrefix + "\n"
|
|
@@ -2648,11 +3046,20 @@ module.exports = {
|
|
|
2648
3046
|
}
|
|
2649
3047
|
};
|
|
2650
3048
|
|
|
2651
|
-
|
|
2652
|
-
|
|
3049
|
+
|
|
3050
|
+
/***/ }),
|
|
3051
|
+
|
|
3052
|
+
/***/ "../lib/md033.js":
|
|
3053
|
+
/*!***********************!*\
|
|
3054
|
+
!*** ../lib/md033.js ***!
|
|
3055
|
+
\***********************/
|
|
3056
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3057
|
+
|
|
2653
3058
|
"use strict";
|
|
2654
|
-
|
|
2655
|
-
|
|
3059
|
+
// @ts-check
|
|
3060
|
+
|
|
3061
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine, unescapeMarkdown = _a.unescapeMarkdown;
|
|
3062
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2656
3063
|
var htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)\/?>/g;
|
|
2657
3064
|
var linkDestinationRe = /]\(\s*$/;
|
|
2658
3065
|
var inlineCodeRe = /^[^`]*(`+[^`]+`+[^`]+)*`+[^`]*$/;
|
|
@@ -2690,10 +3097,19 @@ module.exports = {
|
|
|
2690
3097
|
}
|
|
2691
3098
|
};
|
|
2692
3099
|
|
|
2693
|
-
|
|
2694
|
-
|
|
3100
|
+
|
|
3101
|
+
/***/ }),
|
|
3102
|
+
|
|
3103
|
+
/***/ "../lib/md034.js":
|
|
3104
|
+
/*!***********************!*\
|
|
3105
|
+
!*** ../lib/md034.js ***!
|
|
3106
|
+
\***********************/
|
|
3107
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3108
|
+
|
|
2695
3109
|
"use strict";
|
|
2696
|
-
|
|
3110
|
+
// @ts-check
|
|
3111
|
+
|
|
3112
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, bareUrlRe = _a.bareUrlRe, filterTokens = _a.filterTokens;
|
|
2697
3113
|
module.exports = {
|
|
2698
3114
|
"names": ["MD034", "no-bare-urls"],
|
|
2699
3115
|
"description": "Bare URL used",
|
|
@@ -2742,10 +3158,19 @@ module.exports = {
|
|
|
2742
3158
|
}
|
|
2743
3159
|
};
|
|
2744
3160
|
|
|
2745
|
-
|
|
2746
|
-
|
|
3161
|
+
|
|
3162
|
+
/***/ }),
|
|
3163
|
+
|
|
3164
|
+
/***/ "../lib/md035.js":
|
|
3165
|
+
/*!***********************!*\
|
|
3166
|
+
!*** ../lib/md035.js ***!
|
|
3167
|
+
\***********************/
|
|
3168
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3169
|
+
|
|
2747
3170
|
"use strict";
|
|
2748
|
-
|
|
3171
|
+
// @ts-check
|
|
3172
|
+
|
|
3173
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens;
|
|
2749
3174
|
module.exports = {
|
|
2750
3175
|
"names": ["MD035", "hr-style"],
|
|
2751
3176
|
"description": "Horizontal rule style",
|
|
@@ -2762,10 +3187,19 @@ module.exports = {
|
|
|
2762
3187
|
}
|
|
2763
3188
|
};
|
|
2764
3189
|
|
|
2765
|
-
|
|
2766
|
-
|
|
3190
|
+
|
|
3191
|
+
/***/ }),
|
|
3192
|
+
|
|
3193
|
+
/***/ "../lib/md036.js":
|
|
3194
|
+
/*!***********************!*\
|
|
3195
|
+
!*** ../lib/md036.js ***!
|
|
3196
|
+
\***********************/
|
|
3197
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3198
|
+
|
|
2767
3199
|
"use strict";
|
|
2768
|
-
|
|
3200
|
+
// @ts-check
|
|
3201
|
+
|
|
3202
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, allPunctuation = _a.allPunctuation;
|
|
2769
3203
|
module.exports = {
|
|
2770
3204
|
"names": ["MD036", "no-emphasis-as-heading", "no-emphasis-as-header"],
|
|
2771
3205
|
"description": "Emphasis used instead of a heading",
|
|
@@ -2818,15 +3252,25 @@ module.exports = {
|
|
|
2818
3252
|
}
|
|
2819
3253
|
};
|
|
2820
3254
|
|
|
2821
|
-
|
|
2822
|
-
|
|
3255
|
+
|
|
3256
|
+
/***/ }),
|
|
3257
|
+
|
|
3258
|
+
/***/ "../lib/md037.js":
|
|
3259
|
+
/*!***********************!*\
|
|
3260
|
+
!*** ../lib/md037.js ***!
|
|
3261
|
+
\***********************/
|
|
3262
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3263
|
+
|
|
2823
3264
|
"use strict";
|
|
2824
|
-
|
|
2825
|
-
|
|
3265
|
+
// @ts-check
|
|
3266
|
+
|
|
3267
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, emphasisMarkersInContent = _a.emphasisMarkersInContent, forEachLine = _a.forEachLine, isBlankLine = _a.isBlankLine;
|
|
3268
|
+
var lineMetadata = __webpack_require__(/*! ./cache */ "../lib/cache.js").lineMetadata;
|
|
2826
3269
|
var emphasisRe = /(^|[^\\]|\\\\)(?:(\*\*?\*?)|(__?_?))/g;
|
|
2827
3270
|
var asteriskListItemMarkerRe = /^([\s>]*)\*(\s+)/;
|
|
2828
3271
|
var leftSpaceRe = /^\s+/;
|
|
2829
3272
|
var rightSpaceRe = /\s+$/;
|
|
3273
|
+
var tablePipeRe = /\|/;
|
|
2830
3274
|
module.exports = {
|
|
2831
3275
|
"names": ["MD037", "no-space-in-emphasis"],
|
|
2832
3276
|
"description": "Spaces inside emphasis markers",
|
|
@@ -2843,18 +3287,19 @@ module.exports = {
|
|
|
2843
3287
|
pendingError = null;
|
|
2844
3288
|
}
|
|
2845
3289
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2846
|
-
function handleRunEnd(line, lineIndex, contextLength, match, matchIndex) {
|
|
3290
|
+
function handleRunEnd(line, lineIndex, contextLength, match, matchIndex, inTable) {
|
|
2847
3291
|
// Close current run
|
|
2848
3292
|
var content = line.substring(emphasisIndex, matchIndex);
|
|
2849
3293
|
if (!emphasisLength) {
|
|
2850
|
-
content = content.
|
|
3294
|
+
content = content.trimStart();
|
|
2851
3295
|
}
|
|
2852
3296
|
if (!match) {
|
|
2853
|
-
content = content.
|
|
3297
|
+
content = content.trimEnd();
|
|
2854
3298
|
}
|
|
2855
3299
|
var leftSpace = leftSpaceRe.test(content);
|
|
2856
3300
|
var rightSpace = rightSpaceRe.test(content);
|
|
2857
|
-
if (leftSpace || rightSpace)
|
|
3301
|
+
if ((leftSpace || rightSpace) &&
|
|
3302
|
+
(!inTable || !tablePipeRe.test(content))) {
|
|
2858
3303
|
// Report the violation
|
|
2859
3304
|
var contextStart = emphasisIndex - emphasisLength;
|
|
2860
3305
|
var contextEnd = matchIndex + contextLength;
|
|
@@ -2883,13 +3328,13 @@ module.exports = {
|
|
|
2883
3328
|
// Initialize
|
|
2884
3329
|
var ignoreMarkersByLine = emphasisMarkersInContent(params);
|
|
2885
3330
|
resetRunTracking();
|
|
2886
|
-
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak) {
|
|
3331
|
+
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) {
|
|
2887
3332
|
var onItemStart = (inItem === 1);
|
|
2888
3333
|
if (inCode || inTable || onBreak || onItemStart || isBlankLine(line)) {
|
|
2889
3334
|
// Emphasis resets when leaving a block
|
|
2890
3335
|
resetRunTracking();
|
|
2891
3336
|
}
|
|
2892
|
-
if (inCode || onBreak) {
|
|
3337
|
+
if (inCode || onBreak || inMath) {
|
|
2893
3338
|
// Emphasis has no meaning here
|
|
2894
3339
|
return;
|
|
2895
3340
|
}
|
|
@@ -2920,11 +3365,13 @@ module.exports = {
|
|
|
2920
3365
|
if (matchLength === effectiveEmphasisLength) {
|
|
2921
3366
|
// Ending an existing run, report any pending error
|
|
2922
3367
|
if (pendingError) {
|
|
3368
|
+
// @ts-ignore
|
|
2923
3369
|
addErrorContext.apply(void 0, pendingError);
|
|
2924
3370
|
pendingError = null;
|
|
2925
3371
|
}
|
|
2926
|
-
var error = handleRunEnd(line, lineIndex, effectiveEmphasisLength, match, matchIndex);
|
|
3372
|
+
var error = handleRunEnd(line, lineIndex, effectiveEmphasisLength, match, matchIndex, inTable);
|
|
2927
3373
|
if (error) {
|
|
3374
|
+
// @ts-ignore
|
|
2928
3375
|
addErrorContext.apply(void 0, error);
|
|
2929
3376
|
}
|
|
2930
3377
|
// Reset
|
|
@@ -2956,7 +3403,7 @@ module.exports = {
|
|
|
2956
3403
|
}
|
|
2957
3404
|
if (emphasisIndex !== -1) {
|
|
2958
3405
|
pendingError = pendingError ||
|
|
2959
|
-
handleRunEnd(line, lineIndex, 0, null, line.length);
|
|
3406
|
+
handleRunEnd(line, lineIndex, 0, null, line.length, inTable);
|
|
2960
3407
|
// Adjust for pending run on new line
|
|
2961
3408
|
emphasisIndex = 0;
|
|
2962
3409
|
emphasisLength = 0;
|
|
@@ -2965,10 +3412,19 @@ module.exports = {
|
|
|
2965
3412
|
}
|
|
2966
3413
|
};
|
|
2967
3414
|
|
|
2968
|
-
|
|
2969
|
-
|
|
3415
|
+
|
|
3416
|
+
/***/ }),
|
|
3417
|
+
|
|
3418
|
+
/***/ "../lib/md038.js":
|
|
3419
|
+
/*!***********************!*\
|
|
3420
|
+
!*** ../lib/md038.js ***!
|
|
3421
|
+
\***********************/
|
|
3422
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3423
|
+
|
|
2970
3424
|
"use strict";
|
|
2971
|
-
|
|
3425
|
+
// @ts-check
|
|
3426
|
+
|
|
3427
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, forEachInlineCodeSpan = _a.forEachInlineCodeSpan, newLineRe = _a.newLineRe;
|
|
2972
3428
|
var leftSpaceRe = /^\s([^`]|$)/;
|
|
2973
3429
|
var rightSpaceRe = /[^`]\s$/;
|
|
2974
3430
|
var singleLeftRightSpaceRe = /^\s(?:\S.*\S|\S)\s$/;
|
|
@@ -3019,10 +3475,19 @@ module.exports = {
|
|
|
3019
3475
|
}
|
|
3020
3476
|
};
|
|
3021
3477
|
|
|
3022
|
-
|
|
3023
|
-
|
|
3478
|
+
|
|
3479
|
+
/***/ }),
|
|
3480
|
+
|
|
3481
|
+
/***/ "../lib/md039.js":
|
|
3482
|
+
/*!***********************!*\
|
|
3483
|
+
!*** ../lib/md039.js ***!
|
|
3484
|
+
\***********************/
|
|
3485
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3486
|
+
|
|
3024
3487
|
"use strict";
|
|
3025
|
-
|
|
3488
|
+
// @ts-check
|
|
3489
|
+
|
|
3490
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
3026
3491
|
var spaceInLinkRe = /\[(?:\s+(?:[^\]]*?)\s*|(?:[^\]]*?)\s+)](?=\(\S*\))/;
|
|
3027
3492
|
module.exports = {
|
|
3028
3493
|
"names": ["MD039", "no-space-in-links"],
|
|
@@ -3043,8 +3508,8 @@ module.exports = {
|
|
|
3043
3508
|
}
|
|
3044
3509
|
else if (type === "link_close") {
|
|
3045
3510
|
inLink = false;
|
|
3046
|
-
var left = linkText.
|
|
3047
|
-
var right = linkText.
|
|
3511
|
+
var left = linkText.trimStart().length !== linkText.length;
|
|
3512
|
+
var right = linkText.trimEnd().length !== linkText.length;
|
|
3048
3513
|
if (left || right) {
|
|
3049
3514
|
var line = params.lines[lineNumber - 1];
|
|
3050
3515
|
var range = null;
|
|
@@ -3076,10 +3541,19 @@ module.exports = {
|
|
|
3076
3541
|
}
|
|
3077
3542
|
};
|
|
3078
3543
|
|
|
3079
|
-
|
|
3080
|
-
|
|
3544
|
+
|
|
3545
|
+
/***/ }),
|
|
3546
|
+
|
|
3547
|
+
/***/ "../lib/md040.js":
|
|
3548
|
+
/*!***********************!*\
|
|
3549
|
+
!*** ../lib/md040.js ***!
|
|
3550
|
+
\***********************/
|
|
3551
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3552
|
+
|
|
3081
3553
|
"use strict";
|
|
3082
|
-
|
|
3554
|
+
// @ts-check
|
|
3555
|
+
|
|
3556
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens;
|
|
3083
3557
|
module.exports = {
|
|
3084
3558
|
"names": ["MD040", "fenced-code-language"],
|
|
3085
3559
|
"description": "Fenced code blocks should have a language specified",
|
|
@@ -3093,24 +3567,46 @@ module.exports = {
|
|
|
3093
3567
|
}
|
|
3094
3568
|
};
|
|
3095
3569
|
|
|
3096
|
-
|
|
3097
|
-
|
|
3570
|
+
|
|
3571
|
+
/***/ }),
|
|
3572
|
+
|
|
3573
|
+
/***/ "../lib/md041.js":
|
|
3574
|
+
/*!***********************!*\
|
|
3575
|
+
!*** ../lib/md041.js ***!
|
|
3576
|
+
\***********************/
|
|
3577
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3578
|
+
|
|
3098
3579
|
"use strict";
|
|
3099
|
-
|
|
3580
|
+
// @ts-check
|
|
3581
|
+
|
|
3582
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, frontMatterHasTitle = _a.frontMatterHasTitle;
|
|
3100
3583
|
module.exports = {
|
|
3101
3584
|
"names": ["MD041", "first-line-heading", "first-line-h1"],
|
|
3102
|
-
"description": "First line in file should be a top
|
|
3585
|
+
"description": "First line in a file should be a top-level heading",
|
|
3103
3586
|
"tags": ["headings", "headers"],
|
|
3104
3587
|
"function": function MD041(params, onError) {
|
|
3105
3588
|
var level = Number(params.config.level || 1);
|
|
3106
3589
|
var tag = "h" + level;
|
|
3107
3590
|
var foundFrontMatterTitle = frontMatterHasTitle(params.frontMatterLines, params.config.front_matter_title);
|
|
3108
3591
|
if (!foundFrontMatterTitle) {
|
|
3592
|
+
var htmlHeadingRe_1 = new RegExp("^<h" + level + "[ />]", "i");
|
|
3109
3593
|
params.tokens.every(function (token) {
|
|
3594
|
+
var isError = false;
|
|
3110
3595
|
if (token.type === "html_block") {
|
|
3111
|
-
|
|
3596
|
+
if (token.content.startsWith("<!--")) {
|
|
3597
|
+
// Ignore leading HTML comments
|
|
3598
|
+
return true;
|
|
3599
|
+
}
|
|
3600
|
+
else if (!htmlHeadingRe_1.test(token.content)) {
|
|
3601
|
+
// Something other than an HTML heading
|
|
3602
|
+
isError = true;
|
|
3603
|
+
}
|
|
3112
3604
|
}
|
|
3113
|
-
if ((token.type !== "heading_open") || (token.tag !== tag)) {
|
|
3605
|
+
else if ((token.type !== "heading_open") || (token.tag !== tag)) {
|
|
3606
|
+
// Something other than a Markdown heading
|
|
3607
|
+
isError = true;
|
|
3608
|
+
}
|
|
3609
|
+
if (isError) {
|
|
3114
3610
|
addErrorContext(onError, token.lineNumber, token.line);
|
|
3115
3611
|
}
|
|
3116
3612
|
return false;
|
|
@@ -3119,10 +3615,19 @@ module.exports = {
|
|
|
3119
3615
|
}
|
|
3120
3616
|
};
|
|
3121
3617
|
|
|
3122
|
-
|
|
3123
|
-
|
|
3618
|
+
|
|
3619
|
+
/***/ }),
|
|
3620
|
+
|
|
3621
|
+
/***/ "../lib/md042.js":
|
|
3622
|
+
/*!***********************!*\
|
|
3623
|
+
!*** ../lib/md042.js ***!
|
|
3624
|
+
\***********************/
|
|
3625
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3626
|
+
|
|
3124
3627
|
"use strict";
|
|
3125
|
-
|
|
3628
|
+
// @ts-check
|
|
3629
|
+
|
|
3630
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, filterTokens = _a.filterTokens, rangeFromRegExp = _a.rangeFromRegExp;
|
|
3126
3631
|
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))/;
|
|
3127
3632
|
module.exports = {
|
|
3128
3633
|
"names": ["MD042", "no-empty-links"],
|
|
@@ -3158,10 +3663,19 @@ module.exports = {
|
|
|
3158
3663
|
}
|
|
3159
3664
|
};
|
|
3160
3665
|
|
|
3161
|
-
|
|
3162
|
-
|
|
3666
|
+
|
|
3667
|
+
/***/ }),
|
|
3668
|
+
|
|
3669
|
+
/***/ "../lib/md043.js":
|
|
3670
|
+
/*!***********************!*\
|
|
3671
|
+
!*** ../lib/md043.js ***!
|
|
3672
|
+
\***********************/
|
|
3673
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3674
|
+
|
|
3163
3675
|
"use strict";
|
|
3164
|
-
|
|
3676
|
+
// @ts-check
|
|
3677
|
+
|
|
3678
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorContext = _a.addErrorContext, addErrorDetailIf = _a.addErrorDetailIf, forEachHeading = _a.forEachHeading;
|
|
3165
3679
|
module.exports = {
|
|
3166
3680
|
"names": ["MD043", "required-headings", "required-headers"],
|
|
3167
3681
|
"description": "Required heading structure",
|
|
@@ -3170,42 +3684,61 @@ module.exports = {
|
|
|
3170
3684
|
var requiredHeadings = params.config.headings || params.config.headers;
|
|
3171
3685
|
if (Array.isArray(requiredHeadings)) {
|
|
3172
3686
|
var levels_1 = {};
|
|
3173
|
-
[1, 2, 3, 4, 5, 6].forEach(function
|
|
3687
|
+
[1, 2, 3, 4, 5, 6].forEach(function (level) {
|
|
3174
3688
|
levels_1["h" + level] = "######".substr(-level);
|
|
3175
3689
|
});
|
|
3176
3690
|
var i_1 = 0;
|
|
3177
|
-
var
|
|
3178
|
-
var
|
|
3179
|
-
|
|
3180
|
-
|
|
3691
|
+
var matchAny_1 = false;
|
|
3692
|
+
var hasError_1 = false;
|
|
3693
|
+
var anyHeadings_1 = false;
|
|
3694
|
+
// eslint-disable-next-line func-style
|
|
3695
|
+
var getExpected_1 = function () { return requiredHeadings[i_1++] || "[None]"; };
|
|
3696
|
+
forEachHeading(params, function (heading, content) {
|
|
3697
|
+
if (!hasError_1) {
|
|
3698
|
+
anyHeadings_1 = true;
|
|
3181
3699
|
var actual = levels_1[heading.tag] + " " + content;
|
|
3182
|
-
var expected =
|
|
3700
|
+
var expected = getExpected_1();
|
|
3183
3701
|
if (expected === "*") {
|
|
3184
|
-
|
|
3702
|
+
matchAny_1 = true;
|
|
3703
|
+
getExpected_1();
|
|
3704
|
+
}
|
|
3705
|
+
else if (expected === "+") {
|
|
3706
|
+
matchAny_1 = true;
|
|
3185
3707
|
}
|
|
3186
3708
|
else if (expected.toLowerCase() === actual.toLowerCase()) {
|
|
3187
|
-
|
|
3709
|
+
matchAny_1 = false;
|
|
3188
3710
|
}
|
|
3189
|
-
else if (
|
|
3711
|
+
else if (matchAny_1) {
|
|
3190
3712
|
i_1--;
|
|
3191
3713
|
}
|
|
3192
3714
|
else {
|
|
3193
3715
|
addErrorDetailIf(onError, heading.lineNumber, expected, actual);
|
|
3194
|
-
|
|
3716
|
+
hasError_1 = true;
|
|
3195
3717
|
}
|
|
3196
3718
|
}
|
|
3197
3719
|
});
|
|
3198
|
-
if (
|
|
3720
|
+
if (!hasError_1 &&
|
|
3721
|
+
(i_1 < requiredHeadings.length) &&
|
|
3722
|
+
(anyHeadings_1 || !requiredHeadings.every(function (heading) { return heading === "*"; }))) {
|
|
3199
3723
|
addErrorContext(onError, params.lines.length, requiredHeadings[i_1]);
|
|
3200
3724
|
}
|
|
3201
3725
|
}
|
|
3202
3726
|
}
|
|
3203
3727
|
};
|
|
3204
3728
|
|
|
3205
|
-
|
|
3206
|
-
|
|
3729
|
+
|
|
3730
|
+
/***/ }),
|
|
3731
|
+
|
|
3732
|
+
/***/ "../lib/md044.js":
|
|
3733
|
+
/*!***********************!*\
|
|
3734
|
+
!*** ../lib/md044.js ***!
|
|
3735
|
+
\***********************/
|
|
3736
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3737
|
+
|
|
3207
3738
|
"use strict";
|
|
3208
|
-
|
|
3739
|
+
// @ts-check
|
|
3740
|
+
|
|
3741
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, bareUrlRe = _a.bareUrlRe, escapeForRegExp = _a.escapeForRegExp, filterTokens = _a.filterTokens, forEachInlineChild = _a.forEachInlineChild, newLineRe = _a.newLineRe;
|
|
3209
3742
|
var startNonWordRe = /^\W/;
|
|
3210
3743
|
var endNonWordRe = /\W$/;
|
|
3211
3744
|
module.exports = {
|
|
@@ -3285,10 +3818,19 @@ module.exports = {
|
|
|
3285
3818
|
}
|
|
3286
3819
|
};
|
|
3287
3820
|
|
|
3288
|
-
|
|
3289
|
-
|
|
3821
|
+
|
|
3822
|
+
/***/ }),
|
|
3823
|
+
|
|
3824
|
+
/***/ "../lib/md045.js":
|
|
3825
|
+
/*!***********************!*\
|
|
3826
|
+
!*** ../lib/md045.js ***!
|
|
3827
|
+
\***********************/
|
|
3828
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3829
|
+
|
|
3290
3830
|
"use strict";
|
|
3291
|
-
|
|
3831
|
+
// @ts-check
|
|
3832
|
+
|
|
3833
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachInlineChild = _a.forEachInlineChild;
|
|
3292
3834
|
module.exports = {
|
|
3293
3835
|
"names": ["MD045", "no-alt-text"],
|
|
3294
3836
|
"description": "Images should have alternate text (alt text)",
|
|
@@ -3302,10 +3844,19 @@ module.exports = {
|
|
|
3302
3844
|
}
|
|
3303
3845
|
};
|
|
3304
3846
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3847
|
+
|
|
3848
|
+
/***/ }),
|
|
3849
|
+
|
|
3850
|
+
/***/ "../lib/md046.js":
|
|
3851
|
+
/*!***********************!*\
|
|
3852
|
+
!*** ../lib/md046.js ***!
|
|
3853
|
+
\***********************/
|
|
3854
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3855
|
+
|
|
3307
3856
|
"use strict";
|
|
3308
|
-
|
|
3857
|
+
// @ts-check
|
|
3858
|
+
|
|
3859
|
+
var addErrorDetailIf = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js").addErrorDetailIf;
|
|
3309
3860
|
var tokenTypeToStyle = {
|
|
3310
3861
|
"fence": "fenced",
|
|
3311
3862
|
"code_block": "indented"
|
|
@@ -3328,10 +3879,19 @@ module.exports = {
|
|
|
3328
3879
|
}
|
|
3329
3880
|
};
|
|
3330
3881
|
|
|
3331
|
-
|
|
3332
|
-
|
|
3882
|
+
|
|
3883
|
+
/***/ }),
|
|
3884
|
+
|
|
3885
|
+
/***/ "../lib/md047.js":
|
|
3886
|
+
/*!***********************!*\
|
|
3887
|
+
!*** ../lib/md047.js ***!
|
|
3888
|
+
\***********************/
|
|
3889
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3890
|
+
|
|
3333
3891
|
"use strict";
|
|
3334
|
-
|
|
3892
|
+
// @ts-check
|
|
3893
|
+
|
|
3894
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, isBlankLine = _a.isBlankLine;
|
|
3335
3895
|
module.exports = {
|
|
3336
3896
|
"names": ["MD047", "single-trailing-newline"],
|
|
3337
3897
|
"description": "Files should end with a single newline character",
|
|
@@ -3348,10 +3908,19 @@ module.exports = {
|
|
|
3348
3908
|
}
|
|
3349
3909
|
};
|
|
3350
3910
|
|
|
3351
|
-
|
|
3352
|
-
|
|
3911
|
+
|
|
3912
|
+
/***/ }),
|
|
3913
|
+
|
|
3914
|
+
/***/ "../lib/md048.js":
|
|
3915
|
+
/*!***********************!*\
|
|
3916
|
+
!*** ../lib/md048.js ***!
|
|
3917
|
+
\***********************/
|
|
3918
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3919
|
+
|
|
3353
3920
|
"use strict";
|
|
3354
|
-
|
|
3921
|
+
// @ts-check
|
|
3922
|
+
|
|
3923
|
+
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, fencedCodeBlockStyleFor = _a.fencedCodeBlockStyleFor;
|
|
3355
3924
|
module.exports = {
|
|
3356
3925
|
"names": ["MD048", "code-fence-style"],
|
|
3357
3926
|
"description": "Code fence style",
|
|
@@ -3371,1307 +3940,175 @@ module.exports = {
|
|
|
3371
3940
|
}
|
|
3372
3941
|
};
|
|
3373
3942
|
|
|
3374
|
-
|
|
3375
|
-
|
|
3943
|
+
|
|
3944
|
+
/***/ }),
|
|
3945
|
+
|
|
3946
|
+
/***/ "../lib/rules.js":
|
|
3947
|
+
/*!***********************!*\
|
|
3948
|
+
!*** ../lib/rules.js ***!
|
|
3949
|
+
\***********************/
|
|
3950
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3951
|
+
|
|
3376
3952
|
"use strict";
|
|
3377
|
-
|
|
3953
|
+
// @ts-check
|
|
3954
|
+
|
|
3955
|
+
var packageJson = __webpack_require__(/*! ../package.json */ "../package.json");
|
|
3378
3956
|
var homepage = packageJson.homepage;
|
|
3379
3957
|
var version = packageJson.version;
|
|
3380
3958
|
var rules = [
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
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
|
-
|
|
3959
|
+
__webpack_require__(/*! ./md001 */ "../lib/md001.js"),
|
|
3960
|
+
__webpack_require__(/*! ./md002 */ "../lib/md002.js"),
|
|
3961
|
+
__webpack_require__(/*! ./md003 */ "../lib/md003.js"),
|
|
3962
|
+
__webpack_require__(/*! ./md004 */ "../lib/md004.js"),
|
|
3963
|
+
__webpack_require__(/*! ./md005 */ "../lib/md005.js"),
|
|
3964
|
+
__webpack_require__(/*! ./md006 */ "../lib/md006.js"),
|
|
3965
|
+
__webpack_require__(/*! ./md007 */ "../lib/md007.js"),
|
|
3966
|
+
__webpack_require__(/*! ./md009 */ "../lib/md009.js"),
|
|
3967
|
+
__webpack_require__(/*! ./md010 */ "../lib/md010.js"),
|
|
3968
|
+
__webpack_require__(/*! ./md011 */ "../lib/md011.js"),
|
|
3969
|
+
__webpack_require__(/*! ./md012 */ "../lib/md012.js"),
|
|
3970
|
+
__webpack_require__(/*! ./md013 */ "../lib/md013.js"),
|
|
3971
|
+
__webpack_require__(/*! ./md014 */ "../lib/md014.js"),
|
|
3972
|
+
__webpack_require__(/*! ./md018 */ "../lib/md018.js"),
|
|
3973
|
+
__webpack_require__(/*! ./md019 */ "../lib/md019.js"),
|
|
3974
|
+
__webpack_require__(/*! ./md020 */ "../lib/md020.js"),
|
|
3975
|
+
__webpack_require__(/*! ./md021 */ "../lib/md021.js"),
|
|
3976
|
+
__webpack_require__(/*! ./md022 */ "../lib/md022.js"),
|
|
3977
|
+
__webpack_require__(/*! ./md023 */ "../lib/md023.js"),
|
|
3978
|
+
__webpack_require__(/*! ./md024 */ "../lib/md024.js"),
|
|
3979
|
+
__webpack_require__(/*! ./md025 */ "../lib/md025.js"),
|
|
3980
|
+
__webpack_require__(/*! ./md026 */ "../lib/md026.js"),
|
|
3981
|
+
__webpack_require__(/*! ./md027 */ "../lib/md027.js"),
|
|
3982
|
+
__webpack_require__(/*! ./md028 */ "../lib/md028.js"),
|
|
3983
|
+
__webpack_require__(/*! ./md029 */ "../lib/md029.js"),
|
|
3984
|
+
__webpack_require__(/*! ./md030 */ "../lib/md030.js"),
|
|
3985
|
+
__webpack_require__(/*! ./md031 */ "../lib/md031.js"),
|
|
3986
|
+
__webpack_require__(/*! ./md032 */ "../lib/md032.js"),
|
|
3987
|
+
__webpack_require__(/*! ./md033 */ "../lib/md033.js"),
|
|
3988
|
+
__webpack_require__(/*! ./md034 */ "../lib/md034.js"),
|
|
3989
|
+
__webpack_require__(/*! ./md035 */ "../lib/md035.js"),
|
|
3990
|
+
__webpack_require__(/*! ./md036 */ "../lib/md036.js"),
|
|
3991
|
+
__webpack_require__(/*! ./md037 */ "../lib/md037.js"),
|
|
3992
|
+
__webpack_require__(/*! ./md038 */ "../lib/md038.js"),
|
|
3993
|
+
__webpack_require__(/*! ./md039 */ "../lib/md039.js"),
|
|
3994
|
+
__webpack_require__(/*! ./md040 */ "../lib/md040.js"),
|
|
3995
|
+
__webpack_require__(/*! ./md041 */ "../lib/md041.js"),
|
|
3996
|
+
__webpack_require__(/*! ./md042 */ "../lib/md042.js"),
|
|
3997
|
+
__webpack_require__(/*! ./md043 */ "../lib/md043.js"),
|
|
3998
|
+
__webpack_require__(/*! ./md044 */ "../lib/md044.js"),
|
|
3999
|
+
__webpack_require__(/*! ./md045 */ "../lib/md045.js"),
|
|
4000
|
+
__webpack_require__(/*! ./md046 */ "../lib/md046.js"),
|
|
4001
|
+
__webpack_require__(/*! ./md047 */ "../lib/md047.js"),
|
|
4002
|
+
__webpack_require__(/*! ./md048 */ "../lib/md048.js")
|
|
3425
4003
|
];
|
|
3426
4004
|
rules.forEach(function (rule) {
|
|
3427
4005
|
var name = rule.names[0].toLowerCase();
|
|
3428
|
-
|
|
4006
|
+
// eslint-disable-next-line dot-notation
|
|
4007
|
+
rule["information"] =
|
|
3429
4008
|
new URL(homepage + "/blob/v" + version + "/doc/Rules.md#" + name);
|
|
3430
4009
|
});
|
|
3431
4010
|
module.exports = rules;
|
|
3432
4011
|
|
|
3433
|
-
},{"../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){
|
|
3434
|
-
module.exports={
|
|
3435
|
-
"name": "markdownlint",
|
|
3436
|
-
"version": "0.21.0",
|
|
3437
|
-
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
|
3438
|
-
"main": "lib/markdownlint.js",
|
|
3439
|
-
"types": "lib/markdownlint.d.ts",
|
|
3440
|
-
"author": "David Anson (https://dlaa.me/)",
|
|
3441
|
-
"license": "MIT",
|
|
3442
|
-
"homepage": "https://github.com/DavidAnson/markdownlint",
|
|
3443
|
-
"repository": {
|
|
3444
|
-
"type": "git",
|
|
3445
|
-
"url": "https://github.com/DavidAnson/markdownlint.git"
|
|
3446
|
-
},
|
|
3447
|
-
"bugs": "https://github.com/DavidAnson/markdownlint/issues",
|
|
3448
|
-
"scripts": {
|
|
3449
|
-
"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",
|
|
3450
|
-
"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",
|
|
3451
|
-
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
|
3452
|
-
"test-extra": "node test/markdownlint-test-extra.js",
|
|
3453
|
-
"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",
|
|
3454
|
-
"ci": "npm run test-cover && npm run lint && npm run test-declaration",
|
|
3455
|
-
"build-config-schema": "node schema/build-config-schema.js",
|
|
3456
|
-
"build-declaration": "tsc --allowJs --declaration --outDir declaration --resolveJsonModule lib/markdownlint.js && cpy declaration/lib/markdownlint.d.ts lib && rimraf declaration",
|
|
3457
|
-
"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",
|
|
3458
|
-
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
|
3459
|
-
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
|
3460
|
-
"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",
|
|
3461
|
-
"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",
|
|
3462
|
-
"lint-test-repos": "node test/markdownlint-test-repos.js",
|
|
3463
|
-
"clean-test-repos": "rimraf test-repos"
|
|
3464
|
-
},
|
|
3465
|
-
"engines": {
|
|
3466
|
-
"node": ">=10"
|
|
3467
|
-
},
|
|
3468
|
-
"dependencies": {
|
|
3469
|
-
"markdown-it": "11.0.0"
|
|
3470
|
-
},
|
|
3471
|
-
"devDependencies": {
|
|
3472
|
-
"@types/node": "~14.6.4",
|
|
3473
|
-
"browserify": "~16.5.2",
|
|
3474
|
-
"c8": "~7.3.0",
|
|
3475
|
-
"cpy-cli": "~3.1.1",
|
|
3476
|
-
"eslint": "~7.8.1",
|
|
3477
|
-
"eslint-plugin-jsdoc": "~30.3.1",
|
|
3478
|
-
"eslint-plugin-node": "~11.1.0",
|
|
3479
|
-
"eslint-plugin-unicorn": "~21.0.0",
|
|
3480
|
-
"globby": "~11.0.1",
|
|
3481
|
-
"js-yaml": "~3.14.0",
|
|
3482
|
-
"make-dir-cli": "~2.0.0",
|
|
3483
|
-
"markdown-it-for-inline": "~0.1.1",
|
|
3484
|
-
"@iktakahiro/markdown-it-katex": "~4.0.0",
|
|
3485
|
-
"markdown-it-sub": "~1.0.0",
|
|
3486
|
-
"markdown-it-sup": "~1.0.0",
|
|
3487
|
-
"markdownlint-rule-helpers": "~0.11.0",
|
|
3488
|
-
"rimraf": "~3.0.2",
|
|
3489
|
-
"strip-json-comments": "~3.1.1",
|
|
3490
|
-
"tape": "~5.0.1",
|
|
3491
|
-
"tape-player": "~0.1.1",
|
|
3492
|
-
"toml": "~3.0.0",
|
|
3493
|
-
"tv4": "~1.3.0",
|
|
3494
|
-
"typescript": "~4.0.2",
|
|
3495
|
-
"uglify-js": "~3.10.3"
|
|
3496
|
-
},
|
|
3497
|
-
"keywords": [
|
|
3498
|
-
"markdown",
|
|
3499
|
-
"lint",
|
|
3500
|
-
"md",
|
|
3501
|
-
"CommonMark",
|
|
3502
|
-
"markdownlint"
|
|
3503
|
-
],
|
|
3504
|
-
"browser": {
|
|
3505
|
-
"markdown-it": "../demo/markdown-it-stub.js"
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
|
|
3509
|
-
},{}],51:[function(require,module,exports){
|
|
3510
|
-
|
|
3511
|
-
},{}],52:[function(require,module,exports){
|
|
3512
|
-
exports.endianness = function () { return 'LE' };
|
|
3513
|
-
|
|
3514
|
-
exports.hostname = function () {
|
|
3515
|
-
if (typeof location !== 'undefined') {
|
|
3516
|
-
return location.hostname
|
|
3517
|
-
}
|
|
3518
|
-
else return '';
|
|
3519
|
-
};
|
|
3520
|
-
|
|
3521
|
-
exports.loadavg = function () { return [] };
|
|
3522
|
-
|
|
3523
|
-
exports.uptime = function () { return 0 };
|
|
3524
|
-
|
|
3525
|
-
exports.freemem = function () {
|
|
3526
|
-
return Number.MAX_VALUE;
|
|
3527
|
-
};
|
|
3528
|
-
|
|
3529
|
-
exports.totalmem = function () {
|
|
3530
|
-
return Number.MAX_VALUE;
|
|
3531
|
-
};
|
|
3532
|
-
|
|
3533
|
-
exports.cpus = function () { return [] };
|
|
3534
|
-
|
|
3535
|
-
exports.type = function () { return 'Browser' };
|
|
3536
|
-
|
|
3537
|
-
exports.release = function () {
|
|
3538
|
-
if (typeof navigator !== 'undefined') {
|
|
3539
|
-
return navigator.appVersion;
|
|
3540
|
-
}
|
|
3541
|
-
return '';
|
|
3542
|
-
};
|
|
3543
|
-
|
|
3544
|
-
exports.networkInterfaces
|
|
3545
|
-
= exports.getNetworkInterfaces
|
|
3546
|
-
= function () { return {} };
|
|
3547
|
-
|
|
3548
|
-
exports.arch = function () { return 'javascript' };
|
|
3549
|
-
|
|
3550
|
-
exports.platform = function () { return 'browser' };
|
|
3551
|
-
|
|
3552
|
-
exports.tmpdir = exports.tmpDir = function () {
|
|
3553
|
-
return '/tmp';
|
|
3554
|
-
};
|
|
3555
|
-
|
|
3556
|
-
exports.EOL = '\n';
|
|
3557
|
-
|
|
3558
|
-
exports.homedir = function () {
|
|
3559
|
-
return '/'
|
|
3560
|
-
};
|
|
3561
|
-
|
|
3562
|
-
},{}],53:[function(require,module,exports){
|
|
3563
|
-
(function (process){
|
|
3564
|
-
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
|
|
3565
|
-
// backported and transplited with Babel, with backwards-compat fixes
|
|
3566
|
-
|
|
3567
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
3568
|
-
//
|
|
3569
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
3570
|
-
// copy of this software and associated documentation files (the
|
|
3571
|
-
// "Software"), to deal in the Software without restriction, including
|
|
3572
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
3573
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
3574
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
3575
|
-
// following conditions:
|
|
3576
|
-
//
|
|
3577
|
-
// The above copyright notice and this permission notice shall be included
|
|
3578
|
-
// in all copies or substantial portions of the Software.
|
|
3579
|
-
//
|
|
3580
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
3581
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
3582
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
3583
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
3584
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3585
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3586
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3587
|
-
|
|
3588
|
-
// resolves . and .. elements in a path array with directory names there
|
|
3589
|
-
// must be no slashes, empty elements, or device names (c:\) in the array
|
|
3590
|
-
// (so also no leading and trailing slashes - it does not distinguish
|
|
3591
|
-
// relative and absolute paths)
|
|
3592
|
-
function normalizeArray(parts, allowAboveRoot) {
|
|
3593
|
-
// if the path tries to go above the root, `up` ends up > 0
|
|
3594
|
-
var up = 0;
|
|
3595
|
-
for (var i = parts.length - 1; i >= 0; i--) {
|
|
3596
|
-
var last = parts[i];
|
|
3597
|
-
if (last === '.') {
|
|
3598
|
-
parts.splice(i, 1);
|
|
3599
|
-
} else if (last === '..') {
|
|
3600
|
-
parts.splice(i, 1);
|
|
3601
|
-
up++;
|
|
3602
|
-
} else if (up) {
|
|
3603
|
-
parts.splice(i, 1);
|
|
3604
|
-
up--;
|
|
3605
|
-
}
|
|
3606
|
-
}
|
|
3607
|
-
|
|
3608
|
-
// if the path is allowed to go above the root, restore leading ..s
|
|
3609
|
-
if (allowAboveRoot) {
|
|
3610
|
-
for (; up--; up) {
|
|
3611
|
-
parts.unshift('..');
|
|
3612
|
-
}
|
|
3613
|
-
}
|
|
3614
|
-
|
|
3615
|
-
return parts;
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
// path.resolve([from ...], to)
|
|
3619
|
-
// posix version
|
|
3620
|
-
exports.resolve = function() {
|
|
3621
|
-
var resolvedPath = '',
|
|
3622
|
-
resolvedAbsolute = false;
|
|
3623
|
-
|
|
3624
|
-
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
3625
|
-
var path = (i >= 0) ? arguments[i] : process.cwd();
|
|
3626
|
-
|
|
3627
|
-
// Skip empty and invalid entries
|
|
3628
|
-
if (typeof path !== 'string') {
|
|
3629
|
-
throw new TypeError('Arguments to path.resolve must be strings');
|
|
3630
|
-
} else if (!path) {
|
|
3631
|
-
continue;
|
|
3632
|
-
}
|
|
3633
|
-
|
|
3634
|
-
resolvedPath = path + '/' + resolvedPath;
|
|
3635
|
-
resolvedAbsolute = path.charAt(0) === '/';
|
|
3636
|
-
}
|
|
3637
|
-
|
|
3638
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
3639
|
-
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
3640
|
-
|
|
3641
|
-
// Normalize the path
|
|
3642
|
-
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
|
|
3643
|
-
return !!p;
|
|
3644
|
-
}), !resolvedAbsolute).join('/');
|
|
3645
|
-
|
|
3646
|
-
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
|
3647
|
-
};
|
|
3648
|
-
|
|
3649
|
-
// path.normalize(path)
|
|
3650
|
-
// posix version
|
|
3651
|
-
exports.normalize = function(path) {
|
|
3652
|
-
var isAbsolute = exports.isAbsolute(path),
|
|
3653
|
-
trailingSlash = substr(path, -1) === '/';
|
|
3654
|
-
|
|
3655
|
-
// Normalize the path
|
|
3656
|
-
path = normalizeArray(filter(path.split('/'), function(p) {
|
|
3657
|
-
return !!p;
|
|
3658
|
-
}), !isAbsolute).join('/');
|
|
3659
|
-
|
|
3660
|
-
if (!path && !isAbsolute) {
|
|
3661
|
-
path = '.';
|
|
3662
|
-
}
|
|
3663
|
-
if (path && trailingSlash) {
|
|
3664
|
-
path += '/';
|
|
3665
|
-
}
|
|
3666
|
-
|
|
3667
|
-
return (isAbsolute ? '/' : '') + path;
|
|
3668
|
-
};
|
|
3669
|
-
|
|
3670
|
-
// posix version
|
|
3671
|
-
exports.isAbsolute = function(path) {
|
|
3672
|
-
return path.charAt(0) === '/';
|
|
3673
|
-
};
|
|
3674
|
-
|
|
3675
|
-
// posix version
|
|
3676
|
-
exports.join = function() {
|
|
3677
|
-
var paths = Array.prototype.slice.call(arguments, 0);
|
|
3678
|
-
return exports.normalize(filter(paths, function(p, index) {
|
|
3679
|
-
if (typeof p !== 'string') {
|
|
3680
|
-
throw new TypeError('Arguments to path.join must be strings');
|
|
3681
|
-
}
|
|
3682
|
-
return p;
|
|
3683
|
-
}).join('/'));
|
|
3684
|
-
};
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
// path.relative(from, to)
|
|
3688
|
-
// posix version
|
|
3689
|
-
exports.relative = function(from, to) {
|
|
3690
|
-
from = exports.resolve(from).substr(1);
|
|
3691
|
-
to = exports.resolve(to).substr(1);
|
|
3692
|
-
|
|
3693
|
-
function trim(arr) {
|
|
3694
|
-
var start = 0;
|
|
3695
|
-
for (; start < arr.length; start++) {
|
|
3696
|
-
if (arr[start] !== '') break;
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
var end = arr.length - 1;
|
|
3700
|
-
for (; end >= 0; end--) {
|
|
3701
|
-
if (arr[end] !== '') break;
|
|
3702
|
-
}
|
|
3703
|
-
|
|
3704
|
-
if (start > end) return [];
|
|
3705
|
-
return arr.slice(start, end - start + 1);
|
|
3706
|
-
}
|
|
3707
|
-
|
|
3708
|
-
var fromParts = trim(from.split('/'));
|
|
3709
|
-
var toParts = trim(to.split('/'));
|
|
3710
|
-
|
|
3711
|
-
var length = Math.min(fromParts.length, toParts.length);
|
|
3712
|
-
var samePartsLength = length;
|
|
3713
|
-
for (var i = 0; i < length; i++) {
|
|
3714
|
-
if (fromParts[i] !== toParts[i]) {
|
|
3715
|
-
samePartsLength = i;
|
|
3716
|
-
break;
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
var outputParts = [];
|
|
3721
|
-
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
3722
|
-
outputParts.push('..');
|
|
3723
|
-
}
|
|
3724
|
-
|
|
3725
|
-
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
3726
|
-
|
|
3727
|
-
return outputParts.join('/');
|
|
3728
|
-
};
|
|
3729
|
-
|
|
3730
|
-
exports.sep = '/';
|
|
3731
|
-
exports.delimiter = ':';
|
|
3732
|
-
|
|
3733
|
-
exports.dirname = function (path) {
|
|
3734
|
-
if (typeof path !== 'string') path = path + '';
|
|
3735
|
-
if (path.length === 0) return '.';
|
|
3736
|
-
var code = path.charCodeAt(0);
|
|
3737
|
-
var hasRoot = code === 47 /*/*/;
|
|
3738
|
-
var end = -1;
|
|
3739
|
-
var matchedSlash = true;
|
|
3740
|
-
for (var i = path.length - 1; i >= 1; --i) {
|
|
3741
|
-
code = path.charCodeAt(i);
|
|
3742
|
-
if (code === 47 /*/*/) {
|
|
3743
|
-
if (!matchedSlash) {
|
|
3744
|
-
end = i;
|
|
3745
|
-
break;
|
|
3746
|
-
}
|
|
3747
|
-
} else {
|
|
3748
|
-
// We saw the first non-path separator
|
|
3749
|
-
matchedSlash = false;
|
|
3750
|
-
}
|
|
3751
|
-
}
|
|
3752
|
-
|
|
3753
|
-
if (end === -1) return hasRoot ? '/' : '.';
|
|
3754
|
-
if (hasRoot && end === 1) {
|
|
3755
|
-
// return '//';
|
|
3756
|
-
// Backwards-compat fix:
|
|
3757
|
-
return '/';
|
|
3758
|
-
}
|
|
3759
|
-
return path.slice(0, end);
|
|
3760
|
-
};
|
|
3761
|
-
|
|
3762
|
-
function basename(path) {
|
|
3763
|
-
if (typeof path !== 'string') path = path + '';
|
|
3764
|
-
|
|
3765
|
-
var start = 0;
|
|
3766
|
-
var end = -1;
|
|
3767
|
-
var matchedSlash = true;
|
|
3768
|
-
var i;
|
|
3769
|
-
|
|
3770
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
3771
|
-
if (path.charCodeAt(i) === 47 /*/*/) {
|
|
3772
|
-
// If we reached a path separator that was not part of a set of path
|
|
3773
|
-
// separators at the end of the string, stop now
|
|
3774
|
-
if (!matchedSlash) {
|
|
3775
|
-
start = i + 1;
|
|
3776
|
-
break;
|
|
3777
|
-
}
|
|
3778
|
-
} else if (end === -1) {
|
|
3779
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
3780
|
-
// path component
|
|
3781
|
-
matchedSlash = false;
|
|
3782
|
-
end = i + 1;
|
|
3783
|
-
}
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
if (end === -1) return '';
|
|
3787
|
-
return path.slice(start, end);
|
|
3788
|
-
}
|
|
3789
|
-
|
|
3790
|
-
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
|
|
3791
|
-
// in new Node.js versions, so only basename() above is backported here
|
|
3792
|
-
exports.basename = function (path, ext) {
|
|
3793
|
-
var f = basename(path);
|
|
3794
|
-
if (ext && f.substr(-1 * ext.length) === ext) {
|
|
3795
|
-
f = f.substr(0, f.length - ext.length);
|
|
3796
|
-
}
|
|
3797
|
-
return f;
|
|
3798
|
-
};
|
|
3799
|
-
|
|
3800
|
-
exports.extname = function (path) {
|
|
3801
|
-
if (typeof path !== 'string') path = path + '';
|
|
3802
|
-
var startDot = -1;
|
|
3803
|
-
var startPart = 0;
|
|
3804
|
-
var end = -1;
|
|
3805
|
-
var matchedSlash = true;
|
|
3806
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
3807
|
-
// after any path separator we find
|
|
3808
|
-
var preDotState = 0;
|
|
3809
|
-
for (var i = path.length - 1; i >= 0; --i) {
|
|
3810
|
-
var code = path.charCodeAt(i);
|
|
3811
|
-
if (code === 47 /*/*/) {
|
|
3812
|
-
// If we reached a path separator that was not part of a set of path
|
|
3813
|
-
// separators at the end of the string, stop now
|
|
3814
|
-
if (!matchedSlash) {
|
|
3815
|
-
startPart = i + 1;
|
|
3816
|
-
break;
|
|
3817
|
-
}
|
|
3818
|
-
continue;
|
|
3819
|
-
}
|
|
3820
|
-
if (end === -1) {
|
|
3821
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
3822
|
-
// extension
|
|
3823
|
-
matchedSlash = false;
|
|
3824
|
-
end = i + 1;
|
|
3825
|
-
}
|
|
3826
|
-
if (code === 46 /*.*/) {
|
|
3827
|
-
// If this is our first dot, mark it as the start of our extension
|
|
3828
|
-
if (startDot === -1)
|
|
3829
|
-
startDot = i;
|
|
3830
|
-
else if (preDotState !== 1)
|
|
3831
|
-
preDotState = 1;
|
|
3832
|
-
} else if (startDot !== -1) {
|
|
3833
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
3834
|
-
// have a good chance at having a non-empty extension
|
|
3835
|
-
preDotState = -1;
|
|
3836
|
-
}
|
|
3837
|
-
}
|
|
3838
|
-
|
|
3839
|
-
if (startDot === -1 || end === -1 ||
|
|
3840
|
-
// We saw a non-dot character immediately before the dot
|
|
3841
|
-
preDotState === 0 ||
|
|
3842
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
3843
|
-
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
3844
|
-
return '';
|
|
3845
|
-
}
|
|
3846
|
-
return path.slice(startDot, end);
|
|
3847
|
-
};
|
|
3848
|
-
|
|
3849
|
-
function filter (xs, f) {
|
|
3850
|
-
if (xs.filter) return xs.filter(f);
|
|
3851
|
-
var res = [];
|
|
3852
|
-
for (var i = 0; i < xs.length; i++) {
|
|
3853
|
-
if (f(xs[i], i, xs)) res.push(xs[i]);
|
|
3854
|
-
}
|
|
3855
|
-
return res;
|
|
3856
|
-
}
|
|
3857
|
-
|
|
3858
|
-
// String.prototype.substr - negative index don't work in IE8
|
|
3859
|
-
var substr = 'ab'.substr(-1) === 'b'
|
|
3860
|
-
? function (str, start, len) { return str.substr(start, len) }
|
|
3861
|
-
: function (str, start, len) {
|
|
3862
|
-
if (start < 0) start = str.length + start;
|
|
3863
|
-
return str.substr(start, len);
|
|
3864
|
-
}
|
|
3865
|
-
;
|
|
3866
|
-
|
|
3867
|
-
}).call(this,require('_process'))
|
|
3868
|
-
},{"_process":54}],54:[function(require,module,exports){
|
|
3869
|
-
// shim for using process in browser
|
|
3870
|
-
var process = module.exports = {};
|
|
3871
|
-
|
|
3872
|
-
// cached from whatever global is present so that test runners that stub it
|
|
3873
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
3874
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
3875
|
-
// function because try/catches deoptimize in certain engines.
|
|
3876
|
-
|
|
3877
|
-
var cachedSetTimeout;
|
|
3878
|
-
var cachedClearTimeout;
|
|
3879
|
-
|
|
3880
|
-
function defaultSetTimout() {
|
|
3881
|
-
throw new Error('setTimeout has not been defined');
|
|
3882
|
-
}
|
|
3883
|
-
function defaultClearTimeout () {
|
|
3884
|
-
throw new Error('clearTimeout has not been defined');
|
|
3885
|
-
}
|
|
3886
|
-
(function () {
|
|
3887
|
-
try {
|
|
3888
|
-
if (typeof setTimeout === 'function') {
|
|
3889
|
-
cachedSetTimeout = setTimeout;
|
|
3890
|
-
} else {
|
|
3891
|
-
cachedSetTimeout = defaultSetTimout;
|
|
3892
|
-
}
|
|
3893
|
-
} catch (e) {
|
|
3894
|
-
cachedSetTimeout = defaultSetTimout;
|
|
3895
|
-
}
|
|
3896
|
-
try {
|
|
3897
|
-
if (typeof clearTimeout === 'function') {
|
|
3898
|
-
cachedClearTimeout = clearTimeout;
|
|
3899
|
-
} else {
|
|
3900
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
3901
|
-
}
|
|
3902
|
-
} catch (e) {
|
|
3903
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
3904
|
-
}
|
|
3905
|
-
} ())
|
|
3906
|
-
function runTimeout(fun) {
|
|
3907
|
-
if (cachedSetTimeout === setTimeout) {
|
|
3908
|
-
//normal enviroments in sane situations
|
|
3909
|
-
return setTimeout(fun, 0);
|
|
3910
|
-
}
|
|
3911
|
-
// if setTimeout wasn't available but was latter defined
|
|
3912
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
3913
|
-
cachedSetTimeout = setTimeout;
|
|
3914
|
-
return setTimeout(fun, 0);
|
|
3915
|
-
}
|
|
3916
|
-
try {
|
|
3917
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
3918
|
-
return cachedSetTimeout(fun, 0);
|
|
3919
|
-
} catch(e){
|
|
3920
|
-
try {
|
|
3921
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
3922
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
3923
|
-
} catch(e){
|
|
3924
|
-
// 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
|
|
3925
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
3926
|
-
}
|
|
3927
|
-
}
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
}
|
|
3931
|
-
function runClearTimeout(marker) {
|
|
3932
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
3933
|
-
//normal enviroments in sane situations
|
|
3934
|
-
return clearTimeout(marker);
|
|
3935
|
-
}
|
|
3936
|
-
// if clearTimeout wasn't available but was latter defined
|
|
3937
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
3938
|
-
cachedClearTimeout = clearTimeout;
|
|
3939
|
-
return clearTimeout(marker);
|
|
3940
|
-
}
|
|
3941
|
-
try {
|
|
3942
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
3943
|
-
return cachedClearTimeout(marker);
|
|
3944
|
-
} catch (e){
|
|
3945
|
-
try {
|
|
3946
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
3947
|
-
return cachedClearTimeout.call(null, marker);
|
|
3948
|
-
} catch (e){
|
|
3949
|
-
// 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.
|
|
3950
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
3951
|
-
return cachedClearTimeout.call(this, marker);
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
}
|
|
3958
|
-
var queue = [];
|
|
3959
|
-
var draining = false;
|
|
3960
|
-
var currentQueue;
|
|
3961
|
-
var queueIndex = -1;
|
|
3962
|
-
|
|
3963
|
-
function cleanUpNextTick() {
|
|
3964
|
-
if (!draining || !currentQueue) {
|
|
3965
|
-
return;
|
|
3966
|
-
}
|
|
3967
|
-
draining = false;
|
|
3968
|
-
if (currentQueue.length) {
|
|
3969
|
-
queue = currentQueue.concat(queue);
|
|
3970
|
-
} else {
|
|
3971
|
-
queueIndex = -1;
|
|
3972
|
-
}
|
|
3973
|
-
if (queue.length) {
|
|
3974
|
-
drainQueue();
|
|
3975
|
-
}
|
|
3976
|
-
}
|
|
3977
|
-
|
|
3978
|
-
function drainQueue() {
|
|
3979
|
-
if (draining) {
|
|
3980
|
-
return;
|
|
3981
|
-
}
|
|
3982
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
3983
|
-
draining = true;
|
|
3984
|
-
|
|
3985
|
-
var len = queue.length;
|
|
3986
|
-
while(len) {
|
|
3987
|
-
currentQueue = queue;
|
|
3988
|
-
queue = [];
|
|
3989
|
-
while (++queueIndex < len) {
|
|
3990
|
-
if (currentQueue) {
|
|
3991
|
-
currentQueue[queueIndex].run();
|
|
3992
|
-
}
|
|
3993
|
-
}
|
|
3994
|
-
queueIndex = -1;
|
|
3995
|
-
len = queue.length;
|
|
3996
|
-
}
|
|
3997
|
-
currentQueue = null;
|
|
3998
|
-
draining = false;
|
|
3999
|
-
runClearTimeout(timeout);
|
|
4000
|
-
}
|
|
4001
|
-
|
|
4002
|
-
process.nextTick = function (fun) {
|
|
4003
|
-
var args = new Array(arguments.length - 1);
|
|
4004
|
-
if (arguments.length > 1) {
|
|
4005
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4006
|
-
args[i - 1] = arguments[i];
|
|
4007
|
-
}
|
|
4008
|
-
}
|
|
4009
|
-
queue.push(new Item(fun, args));
|
|
4010
|
-
if (queue.length === 1 && !draining) {
|
|
4011
|
-
runTimeout(drainQueue);
|
|
4012
|
-
}
|
|
4013
|
-
};
|
|
4014
|
-
|
|
4015
|
-
// v8 likes predictible objects
|
|
4016
|
-
function Item(fun, array) {
|
|
4017
|
-
this.fun = fun;
|
|
4018
|
-
this.array = array;
|
|
4019
|
-
}
|
|
4020
|
-
Item.prototype.run = function () {
|
|
4021
|
-
this.fun.apply(null, this.array);
|
|
4022
|
-
};
|
|
4023
|
-
process.title = 'browser';
|
|
4024
|
-
process.browser = true;
|
|
4025
|
-
process.env = {};
|
|
4026
|
-
process.argv = [];
|
|
4027
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
4028
|
-
process.versions = {};
|
|
4029
|
-
|
|
4030
|
-
function noop() {}
|
|
4031
|
-
|
|
4032
|
-
process.on = noop;
|
|
4033
|
-
process.addListener = noop;
|
|
4034
|
-
process.once = noop;
|
|
4035
|
-
process.off = noop;
|
|
4036
|
-
process.removeListener = noop;
|
|
4037
|
-
process.removeAllListeners = noop;
|
|
4038
|
-
process.emit = noop;
|
|
4039
|
-
process.prependListener = noop;
|
|
4040
|
-
process.prependOnceListener = noop;
|
|
4041
|
-
|
|
4042
|
-
process.listeners = function (name) { return [] }
|
|
4043
|
-
|
|
4044
|
-
process.binding = function (name) {
|
|
4045
|
-
throw new Error('process.binding is not supported');
|
|
4046
|
-
};
|
|
4047
|
-
|
|
4048
|
-
process.cwd = function () { return '/' };
|
|
4049
|
-
process.chdir = function (dir) {
|
|
4050
|
-
throw new Error('process.chdir is not supported');
|
|
4051
|
-
};
|
|
4052
|
-
process.umask = function() { return 0; };
|
|
4053
|
-
|
|
4054
|
-
},{}],55:[function(require,module,exports){
|
|
4055
|
-
if (typeof Object.create === 'function') {
|
|
4056
|
-
// implementation from standard node.js 'util' module
|
|
4057
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
4058
|
-
ctor.super_ = superCtor
|
|
4059
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
4060
|
-
constructor: {
|
|
4061
|
-
value: ctor,
|
|
4062
|
-
enumerable: false,
|
|
4063
|
-
writable: true,
|
|
4064
|
-
configurable: true
|
|
4065
|
-
}
|
|
4066
|
-
});
|
|
4067
|
-
};
|
|
4068
|
-
} else {
|
|
4069
|
-
// old school shim for old browsers
|
|
4070
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
4071
|
-
ctor.super_ = superCtor
|
|
4072
|
-
var TempCtor = function () {}
|
|
4073
|
-
TempCtor.prototype = superCtor.prototype
|
|
4074
|
-
ctor.prototype = new TempCtor()
|
|
4075
|
-
ctor.prototype.constructor = ctor
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
|
|
4079
|
-
},{}],56:[function(require,module,exports){
|
|
4080
|
-
module.exports = function isBuffer(arg) {
|
|
4081
|
-
return arg && typeof arg === 'object'
|
|
4082
|
-
&& typeof arg.copy === 'function'
|
|
4083
|
-
&& typeof arg.fill === 'function'
|
|
4084
|
-
&& typeof arg.readUInt8 === 'function';
|
|
4085
|
-
}
|
|
4086
|
-
},{}],57:[function(require,module,exports){
|
|
4087
|
-
(function (process,global){
|
|
4088
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
4089
|
-
//
|
|
4090
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4091
|
-
// copy of this software and associated documentation files (the
|
|
4092
|
-
// "Software"), to deal in the Software without restriction, including
|
|
4093
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
4094
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
4095
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
4096
|
-
// following conditions:
|
|
4097
|
-
//
|
|
4098
|
-
// The above copyright notice and this permission notice shall be included
|
|
4099
|
-
// in all copies or substantial portions of the Software.
|
|
4100
|
-
//
|
|
4101
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
4102
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
4103
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
4104
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
4105
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
4106
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
4107
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
4108
|
-
|
|
4109
|
-
var formatRegExp = /%[sdj%]/g;
|
|
4110
|
-
exports.format = function(f) {
|
|
4111
|
-
if (!isString(f)) {
|
|
4112
|
-
var objects = [];
|
|
4113
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
4114
|
-
objects.push(inspect(arguments[i]));
|
|
4115
|
-
}
|
|
4116
|
-
return objects.join(' ');
|
|
4117
|
-
}
|
|
4118
|
-
|
|
4119
|
-
var i = 1;
|
|
4120
|
-
var args = arguments;
|
|
4121
|
-
var len = args.length;
|
|
4122
|
-
var str = String(f).replace(formatRegExp, function(x) {
|
|
4123
|
-
if (x === '%%') return '%';
|
|
4124
|
-
if (i >= len) return x;
|
|
4125
|
-
switch (x) {
|
|
4126
|
-
case '%s': return String(args[i++]);
|
|
4127
|
-
case '%d': return Number(args[i++]);
|
|
4128
|
-
case '%j':
|
|
4129
|
-
try {
|
|
4130
|
-
return JSON.stringify(args[i++]);
|
|
4131
|
-
} catch (_) {
|
|
4132
|
-
return '[Circular]';
|
|
4133
|
-
}
|
|
4134
|
-
default:
|
|
4135
|
-
return x;
|
|
4136
|
-
}
|
|
4137
|
-
});
|
|
4138
|
-
for (var x = args[i]; i < len; x = args[++i]) {
|
|
4139
|
-
if (isNull(x) || !isObject(x)) {
|
|
4140
|
-
str += ' ' + x;
|
|
4141
|
-
} else {
|
|
4142
|
-
str += ' ' + inspect(x);
|
|
4143
|
-
}
|
|
4144
|
-
}
|
|
4145
|
-
return str;
|
|
4146
|
-
};
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
// Mark that a method should not be used.
|
|
4150
|
-
// Returns a modified function which warns once by default.
|
|
4151
|
-
// If --no-deprecation is set, then it is a no-op.
|
|
4152
|
-
exports.deprecate = function(fn, msg) {
|
|
4153
|
-
// Allow for deprecating things in the process of starting up.
|
|
4154
|
-
if (isUndefined(global.process)) {
|
|
4155
|
-
return function() {
|
|
4156
|
-
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
4157
|
-
};
|
|
4158
|
-
}
|
|
4159
|
-
|
|
4160
|
-
if (process.noDeprecation === true) {
|
|
4161
|
-
return fn;
|
|
4162
|
-
}
|
|
4163
|
-
|
|
4164
|
-
var warned = false;
|
|
4165
|
-
function deprecated() {
|
|
4166
|
-
if (!warned) {
|
|
4167
|
-
if (process.throwDeprecation) {
|
|
4168
|
-
throw new Error(msg);
|
|
4169
|
-
} else if (process.traceDeprecation) {
|
|
4170
|
-
console.trace(msg);
|
|
4171
|
-
} else {
|
|
4172
|
-
console.error(msg);
|
|
4173
|
-
}
|
|
4174
|
-
warned = true;
|
|
4175
|
-
}
|
|
4176
|
-
return fn.apply(this, arguments);
|
|
4177
|
-
}
|
|
4178
|
-
|
|
4179
|
-
return deprecated;
|
|
4180
|
-
};
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
var debugs = {};
|
|
4184
|
-
var debugEnviron;
|
|
4185
|
-
exports.debuglog = function(set) {
|
|
4186
|
-
if (isUndefined(debugEnviron))
|
|
4187
|
-
debugEnviron = process.env.NODE_DEBUG || '';
|
|
4188
|
-
set = set.toUpperCase();
|
|
4189
|
-
if (!debugs[set]) {
|
|
4190
|
-
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
|
4191
|
-
var pid = process.pid;
|
|
4192
|
-
debugs[set] = function() {
|
|
4193
|
-
var msg = exports.format.apply(exports, arguments);
|
|
4194
|
-
console.error('%s %d: %s', set, pid, msg);
|
|
4195
|
-
};
|
|
4196
|
-
} else {
|
|
4197
|
-
debugs[set] = function() {};
|
|
4198
|
-
}
|
|
4199
|
-
}
|
|
4200
|
-
return debugs[set];
|
|
4201
|
-
};
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
/**
|
|
4205
|
-
* Echos the value of a value. Trys to print the value out
|
|
4206
|
-
* in the best way possible given the different types.
|
|
4207
|
-
*
|
|
4208
|
-
* @param {Object} obj The object to print out.
|
|
4209
|
-
* @param {Object} opts Optional options object that alters the output.
|
|
4210
|
-
*/
|
|
4211
|
-
/* legacy: obj, showHidden, depth, colors*/
|
|
4212
|
-
function inspect(obj, opts) {
|
|
4213
|
-
// default options
|
|
4214
|
-
var ctx = {
|
|
4215
|
-
seen: [],
|
|
4216
|
-
stylize: stylizeNoColor
|
|
4217
|
-
};
|
|
4218
|
-
// legacy...
|
|
4219
|
-
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
4220
|
-
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
4221
|
-
if (isBoolean(opts)) {
|
|
4222
|
-
// legacy...
|
|
4223
|
-
ctx.showHidden = opts;
|
|
4224
|
-
} else if (opts) {
|
|
4225
|
-
// got an "options" object
|
|
4226
|
-
exports._extend(ctx, opts);
|
|
4227
|
-
}
|
|
4228
|
-
// set default options
|
|
4229
|
-
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
4230
|
-
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
4231
|
-
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
4232
|
-
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
4233
|
-
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
4234
|
-
return formatValue(ctx, obj, ctx.depth);
|
|
4235
|
-
}
|
|
4236
|
-
exports.inspect = inspect;
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
4240
|
-
inspect.colors = {
|
|
4241
|
-
'bold' : [1, 22],
|
|
4242
|
-
'italic' : [3, 23],
|
|
4243
|
-
'underline' : [4, 24],
|
|
4244
|
-
'inverse' : [7, 27],
|
|
4245
|
-
'white' : [37, 39],
|
|
4246
|
-
'grey' : [90, 39],
|
|
4247
|
-
'black' : [30, 39],
|
|
4248
|
-
'blue' : [34, 39],
|
|
4249
|
-
'cyan' : [36, 39],
|
|
4250
|
-
'green' : [32, 39],
|
|
4251
|
-
'magenta' : [35, 39],
|
|
4252
|
-
'red' : [31, 39],
|
|
4253
|
-
'yellow' : [33, 39]
|
|
4254
|
-
};
|
|
4255
|
-
|
|
4256
|
-
// Don't use 'blue' not visible on cmd.exe
|
|
4257
|
-
inspect.styles = {
|
|
4258
|
-
'special': 'cyan',
|
|
4259
|
-
'number': 'yellow',
|
|
4260
|
-
'boolean': 'yellow',
|
|
4261
|
-
'undefined': 'grey',
|
|
4262
|
-
'null': 'bold',
|
|
4263
|
-
'string': 'green',
|
|
4264
|
-
'date': 'magenta',
|
|
4265
|
-
// "name": intentionally not styling
|
|
4266
|
-
'regexp': 'red'
|
|
4267
|
-
};
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
function stylizeWithColor(str, styleType) {
|
|
4271
|
-
var style = inspect.styles[styleType];
|
|
4272
|
-
|
|
4273
|
-
if (style) {
|
|
4274
|
-
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
4275
|
-
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
4276
|
-
} else {
|
|
4277
|
-
return str;
|
|
4278
|
-
}
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
function stylizeNoColor(str, styleType) {
|
|
4283
|
-
return str;
|
|
4284
|
-
}
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
function arrayToHash(array) {
|
|
4288
|
-
var hash = {};
|
|
4289
|
-
|
|
4290
|
-
array.forEach(function(val, idx) {
|
|
4291
|
-
hash[val] = true;
|
|
4292
|
-
});
|
|
4293
|
-
|
|
4294
|
-
return hash;
|
|
4295
|
-
}
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
function formatValue(ctx, value, recurseTimes) {
|
|
4299
|
-
// Provide a hook for user-specified inspect functions.
|
|
4300
|
-
// Check that value is an object with an inspect function on it
|
|
4301
|
-
if (ctx.customInspect &&
|
|
4302
|
-
value &&
|
|
4303
|
-
isFunction(value.inspect) &&
|
|
4304
|
-
// Filter out the util module, it's inspect function is special
|
|
4305
|
-
value.inspect !== exports.inspect &&
|
|
4306
|
-
// Also filter out any prototype objects using the circular check.
|
|
4307
|
-
!(value.constructor && value.constructor.prototype === value)) {
|
|
4308
|
-
var ret = value.inspect(recurseTimes, ctx);
|
|
4309
|
-
if (!isString(ret)) {
|
|
4310
|
-
ret = formatValue(ctx, ret, recurseTimes);
|
|
4311
|
-
}
|
|
4312
|
-
return ret;
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
// Primitive types cannot have properties
|
|
4316
|
-
var primitive = formatPrimitive(ctx, value);
|
|
4317
|
-
if (primitive) {
|
|
4318
|
-
return primitive;
|
|
4319
|
-
}
|
|
4320
|
-
|
|
4321
|
-
// Look up the keys of the object.
|
|
4322
|
-
var keys = Object.keys(value);
|
|
4323
|
-
var visibleKeys = arrayToHash(keys);
|
|
4324
|
-
|
|
4325
|
-
if (ctx.showHidden) {
|
|
4326
|
-
keys = Object.getOwnPropertyNames(value);
|
|
4327
|
-
}
|
|
4328
|
-
|
|
4329
|
-
// IE doesn't make error fields non-enumerable
|
|
4330
|
-
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
4331
|
-
if (isError(value)
|
|
4332
|
-
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
4333
|
-
return formatError(value);
|
|
4334
|
-
}
|
|
4335
|
-
|
|
4336
|
-
// Some type of object without properties can be shortcutted.
|
|
4337
|
-
if (keys.length === 0) {
|
|
4338
|
-
if (isFunction(value)) {
|
|
4339
|
-
var name = value.name ? ': ' + value.name : '';
|
|
4340
|
-
return ctx.stylize('[Function' + name + ']', 'special');
|
|
4341
|
-
}
|
|
4342
|
-
if (isRegExp(value)) {
|
|
4343
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4344
|
-
}
|
|
4345
|
-
if (isDate(value)) {
|
|
4346
|
-
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
4347
|
-
}
|
|
4348
|
-
if (isError(value)) {
|
|
4349
|
-
return formatError(value);
|
|
4350
|
-
}
|
|
4351
|
-
}
|
|
4352
|
-
|
|
4353
|
-
var base = '', array = false, braces = ['{', '}'];
|
|
4354
|
-
|
|
4355
|
-
// Make Array say that they are Array
|
|
4356
|
-
if (isArray(value)) {
|
|
4357
|
-
array = true;
|
|
4358
|
-
braces = ['[', ']'];
|
|
4359
|
-
}
|
|
4360
|
-
|
|
4361
|
-
// Make functions say that they are functions
|
|
4362
|
-
if (isFunction(value)) {
|
|
4363
|
-
var n = value.name ? ': ' + value.name : '';
|
|
4364
|
-
base = ' [Function' + n + ']';
|
|
4365
|
-
}
|
|
4366
|
-
|
|
4367
|
-
// Make RegExps say that they are RegExps
|
|
4368
|
-
if (isRegExp(value)) {
|
|
4369
|
-
base = ' ' + RegExp.prototype.toString.call(value);
|
|
4370
|
-
}
|
|
4371
|
-
|
|
4372
|
-
// Make dates with properties first say the date
|
|
4373
|
-
if (isDate(value)) {
|
|
4374
|
-
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
// Make error with message first say the error
|
|
4378
|
-
if (isError(value)) {
|
|
4379
|
-
base = ' ' + formatError(value);
|
|
4380
|
-
}
|
|
4381
|
-
|
|
4382
|
-
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
4383
|
-
return braces[0] + base + braces[1];
|
|
4384
|
-
}
|
|
4385
|
-
|
|
4386
|
-
if (recurseTimes < 0) {
|
|
4387
|
-
if (isRegExp(value)) {
|
|
4388
|
-
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
4389
|
-
} else {
|
|
4390
|
-
return ctx.stylize('[Object]', 'special');
|
|
4391
|
-
}
|
|
4392
|
-
}
|
|
4393
|
-
|
|
4394
|
-
ctx.seen.push(value);
|
|
4395
|
-
|
|
4396
|
-
var output;
|
|
4397
|
-
if (array) {
|
|
4398
|
-
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
4399
|
-
} else {
|
|
4400
|
-
output = keys.map(function(key) {
|
|
4401
|
-
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
4402
|
-
});
|
|
4403
|
-
}
|
|
4404
|
-
|
|
4405
|
-
ctx.seen.pop();
|
|
4406
|
-
|
|
4407
|
-
return reduceToSingleString(output, base, braces);
|
|
4408
|
-
}
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
function formatPrimitive(ctx, value) {
|
|
4412
|
-
if (isUndefined(value))
|
|
4413
|
-
return ctx.stylize('undefined', 'undefined');
|
|
4414
|
-
if (isString(value)) {
|
|
4415
|
-
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
4416
|
-
.replace(/'/g, "\\'")
|
|
4417
|
-
.replace(/\\"/g, '"') + '\'';
|
|
4418
|
-
return ctx.stylize(simple, 'string');
|
|
4419
|
-
}
|
|
4420
|
-
if (isNumber(value))
|
|
4421
|
-
return ctx.stylize('' + value, 'number');
|
|
4422
|
-
if (isBoolean(value))
|
|
4423
|
-
return ctx.stylize('' + value, 'boolean');
|
|
4424
|
-
// For some reason typeof null is "object", so special case here.
|
|
4425
|
-
if (isNull(value))
|
|
4426
|
-
return ctx.stylize('null', 'null');
|
|
4427
|
-
}
|
|
4428
|
-
|
|
4429
4012
|
|
|
4430
|
-
|
|
4431
|
-
return '[' + Error.prototype.toString.call(value) + ']';
|
|
4432
|
-
}
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
4436
|
-
var output = [];
|
|
4437
|
-
for (var i = 0, l = value.length; i < l; ++i) {
|
|
4438
|
-
if (hasOwnProperty(value, String(i))) {
|
|
4439
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4440
|
-
String(i), true));
|
|
4441
|
-
} else {
|
|
4442
|
-
output.push('');
|
|
4443
|
-
}
|
|
4444
|
-
}
|
|
4445
|
-
keys.forEach(function(key) {
|
|
4446
|
-
if (!key.match(/^\d+$/)) {
|
|
4447
|
-
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
4448
|
-
key, true));
|
|
4449
|
-
}
|
|
4450
|
-
});
|
|
4451
|
-
return output;
|
|
4452
|
-
}
|
|
4013
|
+
/***/ }),
|
|
4453
4014
|
|
|
4015
|
+
/***/ "../package.json":
|
|
4016
|
+
/*!***********************!*\
|
|
4017
|
+
!*** ../package.json ***!
|
|
4018
|
+
\***********************/
|
|
4019
|
+
/***/ ((module) => {
|
|
4454
4020
|
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
4458
|
-
if (desc.get) {
|
|
4459
|
-
if (desc.set) {
|
|
4460
|
-
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
4461
|
-
} else {
|
|
4462
|
-
str = ctx.stylize('[Getter]', 'special');
|
|
4463
|
-
}
|
|
4464
|
-
} else {
|
|
4465
|
-
if (desc.set) {
|
|
4466
|
-
str = ctx.stylize('[Setter]', 'special');
|
|
4467
|
-
}
|
|
4468
|
-
}
|
|
4469
|
-
if (!hasOwnProperty(visibleKeys, key)) {
|
|
4470
|
-
name = '[' + key + ']';
|
|
4471
|
-
}
|
|
4472
|
-
if (!str) {
|
|
4473
|
-
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
4474
|
-
if (isNull(recurseTimes)) {
|
|
4475
|
-
str = formatValue(ctx, desc.value, null);
|
|
4476
|
-
} else {
|
|
4477
|
-
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
4478
|
-
}
|
|
4479
|
-
if (str.indexOf('\n') > -1) {
|
|
4480
|
-
if (array) {
|
|
4481
|
-
str = str.split('\n').map(function(line) {
|
|
4482
|
-
return ' ' + line;
|
|
4483
|
-
}).join('\n').substr(2);
|
|
4484
|
-
} else {
|
|
4485
|
-
str = '\n' + str.split('\n').map(function(line) {
|
|
4486
|
-
return ' ' + line;
|
|
4487
|
-
}).join('\n');
|
|
4488
|
-
}
|
|
4489
|
-
}
|
|
4490
|
-
} else {
|
|
4491
|
-
str = ctx.stylize('[Circular]', 'special');
|
|
4492
|
-
}
|
|
4493
|
-
}
|
|
4494
|
-
if (isUndefined(name)) {
|
|
4495
|
-
if (array && key.match(/^\d+$/)) {
|
|
4496
|
-
return str;
|
|
4497
|
-
}
|
|
4498
|
-
name = JSON.stringify('' + key);
|
|
4499
|
-
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
4500
|
-
name = name.substr(1, name.length - 2);
|
|
4501
|
-
name = ctx.stylize(name, 'name');
|
|
4502
|
-
} else {
|
|
4503
|
-
name = name.replace(/'/g, "\\'")
|
|
4504
|
-
.replace(/\\"/g, '"')
|
|
4505
|
-
.replace(/(^"|"$)/g, "'");
|
|
4506
|
-
name = ctx.stylize(name, 'string');
|
|
4507
|
-
}
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
return name + ': ' + str;
|
|
4511
|
-
}
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
function reduceToSingleString(output, base, braces) {
|
|
4515
|
-
var numLinesEst = 0;
|
|
4516
|
-
var length = output.reduce(function(prev, cur) {
|
|
4517
|
-
numLinesEst++;
|
|
4518
|
-
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
|
4519
|
-
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
4520
|
-
}, 0);
|
|
4521
|
-
|
|
4522
|
-
if (length > 60) {
|
|
4523
|
-
return braces[0] +
|
|
4524
|
-
(base === '' ? '' : base + '\n ') +
|
|
4525
|
-
' ' +
|
|
4526
|
-
output.join(',\n ') +
|
|
4527
|
-
' ' +
|
|
4528
|
-
braces[1];
|
|
4529
|
-
}
|
|
4530
|
-
|
|
4531
|
-
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
4532
|
-
}
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4536
|
-
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4537
|
-
function isArray(ar) {
|
|
4538
|
-
return Array.isArray(ar);
|
|
4539
|
-
}
|
|
4540
|
-
exports.isArray = isArray;
|
|
4541
|
-
|
|
4542
|
-
function isBoolean(arg) {
|
|
4543
|
-
return typeof arg === 'boolean';
|
|
4544
|
-
}
|
|
4545
|
-
exports.isBoolean = isBoolean;
|
|
4546
|
-
|
|
4547
|
-
function isNull(arg) {
|
|
4548
|
-
return arg === null;
|
|
4549
|
-
}
|
|
4550
|
-
exports.isNull = isNull;
|
|
4551
|
-
|
|
4552
|
-
function isNullOrUndefined(arg) {
|
|
4553
|
-
return arg == null;
|
|
4554
|
-
}
|
|
4555
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
4556
|
-
|
|
4557
|
-
function isNumber(arg) {
|
|
4558
|
-
return typeof arg === 'number';
|
|
4559
|
-
}
|
|
4560
|
-
exports.isNumber = isNumber;
|
|
4561
|
-
|
|
4562
|
-
function isString(arg) {
|
|
4563
|
-
return typeof arg === 'string';
|
|
4564
|
-
}
|
|
4565
|
-
exports.isString = isString;
|
|
4566
|
-
|
|
4567
|
-
function isSymbol(arg) {
|
|
4568
|
-
return typeof arg === 'symbol';
|
|
4569
|
-
}
|
|
4570
|
-
exports.isSymbol = isSymbol;
|
|
4571
|
-
|
|
4572
|
-
function isUndefined(arg) {
|
|
4573
|
-
return arg === void 0;
|
|
4574
|
-
}
|
|
4575
|
-
exports.isUndefined = isUndefined;
|
|
4576
|
-
|
|
4577
|
-
function isRegExp(re) {
|
|
4578
|
-
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
4579
|
-
}
|
|
4580
|
-
exports.isRegExp = isRegExp;
|
|
4581
|
-
|
|
4582
|
-
function isObject(arg) {
|
|
4583
|
-
return typeof arg === 'object' && arg !== null;
|
|
4584
|
-
}
|
|
4585
|
-
exports.isObject = isObject;
|
|
4586
|
-
|
|
4587
|
-
function isDate(d) {
|
|
4588
|
-
return isObject(d) && objectToString(d) === '[object Date]';
|
|
4589
|
-
}
|
|
4590
|
-
exports.isDate = isDate;
|
|
4591
|
-
|
|
4592
|
-
function isError(e) {
|
|
4593
|
-
return isObject(e) &&
|
|
4594
|
-
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
4595
|
-
}
|
|
4596
|
-
exports.isError = isError;
|
|
4597
|
-
|
|
4598
|
-
function isFunction(arg) {
|
|
4599
|
-
return typeof arg === 'function';
|
|
4600
|
-
}
|
|
4601
|
-
exports.isFunction = isFunction;
|
|
4602
|
-
|
|
4603
|
-
function isPrimitive(arg) {
|
|
4604
|
-
return arg === null ||
|
|
4605
|
-
typeof arg === 'boolean' ||
|
|
4606
|
-
typeof arg === 'number' ||
|
|
4607
|
-
typeof arg === 'string' ||
|
|
4608
|
-
typeof arg === 'symbol' || // ES6 symbol
|
|
4609
|
-
typeof arg === 'undefined';
|
|
4610
|
-
}
|
|
4611
|
-
exports.isPrimitive = isPrimitive;
|
|
4612
|
-
|
|
4613
|
-
exports.isBuffer = require('./support/isBuffer');
|
|
4614
|
-
|
|
4615
|
-
function objectToString(o) {
|
|
4616
|
-
return Object.prototype.toString.call(o);
|
|
4617
|
-
}
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
function pad(n) {
|
|
4621
|
-
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
4622
|
-
}
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
|
4626
|
-
'Oct', 'Nov', 'Dec'];
|
|
4627
|
-
|
|
4628
|
-
// 26 Feb 16:19:34
|
|
4629
|
-
function timestamp() {
|
|
4630
|
-
var d = new Date();
|
|
4631
|
-
var time = [pad(d.getHours()),
|
|
4632
|
-
pad(d.getMinutes()),
|
|
4633
|
-
pad(d.getSeconds())].join(':');
|
|
4634
|
-
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
4635
|
-
}
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
// log is just a thin wrapper to console.log that prepends a timestamp
|
|
4639
|
-
exports.log = function() {
|
|
4640
|
-
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
|
|
4641
|
-
};
|
|
4021
|
+
"use strict";
|
|
4022
|
+
module.exports = JSON.parse("{\"name\":\"markdownlint\",\"version\":\"0.23.1\",\"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\":\"mkdir 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\",\"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\",\"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.0.4\"},\"devDependencies\":{\"ava\":\"~3.15.0\",\"c8\":\"~7.5.0\",\"cpy-cli\":\"~3.1.1\",\"eslint\":\"~7.19.0\",\"eslint-plugin-jsdoc\":\"~31.6.0\",\"eslint-plugin-node\":\"~11.1.0\",\"eslint-plugin-unicorn\":\"~27.0.0\",\"globby\":\"~11.0.2\",\"js-yaml\":\"~4.0.0\",\"markdown-it-for-inline\":\"~0.1.1\",\"markdown-it-sub\":\"~1.0.0\",\"markdown-it-sup\":\"~1.0.0\",\"markdown-it-texmath\":\"~0.8.0\",\"markdownlint-rule-helpers\":\"~0.13.0\",\"npm-run-all\":\"~4.1.5\",\"rimraf\":\"~3.0.2\",\"strip-json-comments\":\"~3.1.1\",\"toml\":\"~3.0.0\",\"ts-loader\":\"~8.0.15\",\"tv4\":\"~1.3.0\",\"typescript\":\"~4.1.3\",\"webpack\":\"~5.21.1\",\"webpack-cli\":\"~4.5.0\"},\"keywords\":[\"markdown\",\"lint\",\"md\",\"CommonMark\",\"markdownlint\"]}");
|
|
4642
4023
|
|
|
4024
|
+
/***/ }),
|
|
4643
4025
|
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
* during bootstrapping this function needs to be rewritten using some native
|
|
4650
|
-
* functions as prototype setup using normal JavaScript does not work as
|
|
4651
|
-
* expected during bootstrapping (see mirror.js in r114903).
|
|
4652
|
-
*
|
|
4653
|
-
* @param {function} ctor Constructor function which needs to inherit the
|
|
4654
|
-
* prototype.
|
|
4655
|
-
* @param {function} superCtor Constructor function to inherit prototype from.
|
|
4656
|
-
*/
|
|
4657
|
-
exports.inherits = require('inherits');
|
|
4658
|
-
|
|
4659
|
-
exports._extend = function(origin, add) {
|
|
4660
|
-
// Don't do anything if add isn't an object
|
|
4661
|
-
if (!add || !isObject(add)) return origin;
|
|
4662
|
-
|
|
4663
|
-
var keys = Object.keys(add);
|
|
4664
|
-
var i = keys.length;
|
|
4665
|
-
while (i--) {
|
|
4666
|
-
origin[keys[i]] = add[keys[i]];
|
|
4667
|
-
}
|
|
4668
|
-
return origin;
|
|
4669
|
-
};
|
|
4670
|
-
|
|
4671
|
-
function hasOwnProperty(obj, prop) {
|
|
4672
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
4673
|
-
}
|
|
4026
|
+
/***/ "markdown-it":
|
|
4027
|
+
/*!*****************************!*\
|
|
4028
|
+
!*** external "markdownit" ***!
|
|
4029
|
+
\*****************************/
|
|
4030
|
+
/***/ ((module) => {
|
|
4674
4031
|
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4032
|
+
"use strict";
|
|
4033
|
+
module.exports = markdownit;
|
|
4034
|
+
|
|
4035
|
+
/***/ }),
|
|
4036
|
+
|
|
4037
|
+
/***/ "?65c5":
|
|
4038
|
+
/*!********************!*\
|
|
4039
|
+
!*** fs (ignored) ***!
|
|
4040
|
+
\********************/
|
|
4041
|
+
/***/ (() => {
|
|
4042
|
+
|
|
4043
|
+
/* (ignored) */
|
|
4044
|
+
|
|
4045
|
+
/***/ }),
|
|
4046
|
+
|
|
4047
|
+
/***/ "?5533":
|
|
4048
|
+
/*!********************!*\
|
|
4049
|
+
!*** os (ignored) ***!
|
|
4050
|
+
\********************/
|
|
4051
|
+
/***/ (() => {
|
|
4052
|
+
|
|
4053
|
+
/* (ignored) */
|
|
4054
|
+
|
|
4055
|
+
/***/ }),
|
|
4056
|
+
|
|
4057
|
+
/***/ "?0f27":
|
|
4058
|
+
/*!**********************!*\
|
|
4059
|
+
!*** path (ignored) ***!
|
|
4060
|
+
\**********************/
|
|
4061
|
+
/***/ (() => {
|
|
4062
|
+
|
|
4063
|
+
/* (ignored) */
|
|
4064
|
+
|
|
4065
|
+
/***/ }),
|
|
4066
|
+
|
|
4067
|
+
/***/ "?0bed":
|
|
4068
|
+
/*!**********************!*\
|
|
4069
|
+
!*** util (ignored) ***!
|
|
4070
|
+
\**********************/
|
|
4071
|
+
/***/ (() => {
|
|
4072
|
+
|
|
4073
|
+
/* (ignored) */
|
|
4074
|
+
|
|
4075
|
+
/***/ })
|
|
4076
|
+
|
|
4077
|
+
/******/ });
|
|
4078
|
+
/************************************************************************/
|
|
4079
|
+
/******/ // The module cache
|
|
4080
|
+
/******/ var __webpack_module_cache__ = {};
|
|
4081
|
+
/******/
|
|
4082
|
+
/******/ // The require function
|
|
4083
|
+
/******/ function __webpack_require__(moduleId) {
|
|
4084
|
+
/******/ // Check if module is in cache
|
|
4085
|
+
/******/ if(__webpack_module_cache__[moduleId]) {
|
|
4086
|
+
/******/ return __webpack_module_cache__[moduleId].exports;
|
|
4087
|
+
/******/ }
|
|
4088
|
+
/******/ // Create a new module (and put it into the cache)
|
|
4089
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
4090
|
+
/******/ // no module.id needed
|
|
4091
|
+
/******/ // no module.loaded needed
|
|
4092
|
+
/******/ exports: {}
|
|
4093
|
+
/******/ };
|
|
4094
|
+
/******/
|
|
4095
|
+
/******/ // Execute the module function
|
|
4096
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
4097
|
+
/******/
|
|
4098
|
+
/******/ // Return the exports of the module
|
|
4099
|
+
/******/ return module.exports;
|
|
4100
|
+
/******/ }
|
|
4101
|
+
/******/
|
|
4102
|
+
/************************************************************************/
|
|
4103
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
4104
|
+
/******/ (() => {
|
|
4105
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
4106
|
+
/******/ })();
|
|
4107
|
+
/******/
|
|
4108
|
+
/************************************************************************/
|
|
4109
|
+
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
|
4110
|
+
/******/ // startup
|
|
4111
|
+
/******/ // Load entry module and return exports
|
|
4112
|
+
/******/ return __webpack_require__("../lib/markdownlint.js");
|
|
4113
|
+
/******/ })()
|
|
4114
|
+
;
|