mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update to version 0.17.2.
This commit is contained in:
parent
c60bce69e2
commit
fd06a50ee5
4 changed files with 9 additions and 8 deletions
|
|
@ -808,6 +808,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
||||||
add fix information for 24 rules, update newline handling to match latest
|
add fix information for 24 rules, update newline handling to match latest
|
||||||
CommonMark specification, improve MD014/MD037/MD039, update dependencies.
|
CommonMark specification, improve MD014/MD037/MD039, update dependencies.
|
||||||
* 0.17.1 - Fix handling of front matter by fix information.
|
* 0.17.1 - Fix handling of front matter by fix information.
|
||||||
|
* 0.17.2 - Improve MD020/MD033/MD044.
|
||||||
|
|
||||||
[npm-image]: https://img.shields.io/npm/v/markdownlint.svg
|
[npm-image]: https://img.shields.io/npm/v/markdownlint.svg
|
||||||
[npm-url]: https://www.npmjs.com/package/markdownlint
|
[npm-url]: https://www.npmjs.com/package/markdownlint
|
||||||
|
|
|
||||||
|
|
@ -1740,7 +1740,7 @@ module.exports = {
|
||||||
"function": function MD020(params, onError) {
|
"function": function MD020(params, onError) {
|
||||||
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
||||||
if (!inCode) {
|
if (!inCode) {
|
||||||
var match = /^(#+)(\s*)([^#]+?[^#\\])(\s*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
var match = /^(#+)(\s*)([^#]*?[^#\\])(\s*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
||||||
if (match) {
|
if (match) {
|
||||||
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"];
|
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"];
|
||||||
var leftHashLength = leftHash.length;
|
var leftHashLength = leftHash.length;
|
||||||
|
|
@ -2192,7 +2192,7 @@ module.exports = {
|
||||||
},{"../helpers":2,"./cache":3}],33:[function(require,module,exports){
|
},{"../helpers":2,"./cache":3}],33:[function(require,module,exports){
|
||||||
// @ts-check
|
// @ts-check
|
||||||
"use strict";
|
"use strict";
|
||||||
var _a = require("../helpers"), addError = _a.addError, bareUrlRe = _a.bareUrlRe, forEachLine = _a.forEachLine, unescapeMarkdown = _a.unescapeMarkdown;
|
var _a = require("../helpers"), addError = _a.addError, forEachLine = _a.forEachLine, unescapeMarkdown = _a.unescapeMarkdown;
|
||||||
var lineMetadata = require("./cache").lineMetadata;
|
var lineMetadata = require("./cache").lineMetadata;
|
||||||
var htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)\/?>/g;
|
var htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)\/?>/g;
|
||||||
var linkDestinationRe = /]\(\s*$/;
|
var linkDestinationRe = /]\(\s*$/;
|
||||||
|
|
@ -2211,10 +2211,10 @@ module.exports = {
|
||||||
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
||||||
var match = null;
|
var match = null;
|
||||||
// eslint-disable-next-line no-unmodified-loop-condition
|
// eslint-disable-next-line no-unmodified-loop-condition
|
||||||
while (!inCode && (match = htmlElementRe.exec(line))) {
|
while (!inCode && ((match = htmlElementRe.exec(line)) !== null)) {
|
||||||
var tag = match[0], content = match[1], element = match[2];
|
var tag = match[0], content = match[1], element = match[2];
|
||||||
if (!allowedElements.includes(element.toLowerCase()) &&
|
if (!allowedElements.includes(element.toLowerCase()) &&
|
||||||
!tag.endsWith("\\>") && !bareUrlRe.test(content) &&
|
!tag.endsWith("\\>") &&
|
||||||
!emailAddressRe.test(content)) {
|
!emailAddressRe.test(content)) {
|
||||||
var prefix = line.substring(0, match.index);
|
var prefix = line.substring(0, match.index);
|
||||||
if (!linkDestinationRe.test(prefix) && !inlineCodeRe.test(prefix)) {
|
if (!linkDestinationRe.test(prefix) && !inlineCodeRe.test(prefix)) {
|
||||||
|
|
@ -2637,7 +2637,7 @@ module.exports = {
|
||||||
var match = null;
|
var match = null;
|
||||||
while ((match = anyNameRe.exec(line)) !== null) {
|
while ((match = anyNameRe.exec(line)) !== null) {
|
||||||
var fullMatch = match[0];
|
var fullMatch = match[0];
|
||||||
if (!bareUrlRe.test(fullMatch)) {
|
if (fullMatch.search(bareUrlRe) === -1) {
|
||||||
var wordMatch = fullMatch
|
var wordMatch = fullMatch
|
||||||
.replace(/^\W*/, "").replace(/\W*$/, "");
|
.replace(/^\W*/, "").replace(/\W*$/, "");
|
||||||
if (!names.includes(wordMatch)) {
|
if (!names.includes(wordMatch)) {
|
||||||
|
|
@ -2796,7 +2796,7 @@ module.exports = rules;
|
||||||
},{"../package.json":49,"./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,"url":58}],49:[function(require,module,exports){
|
},{"../package.json":49,"./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,"url":58}],49:[function(require,module,exports){
|
||||||
module.exports={
|
module.exports={
|
||||||
"name": "markdownlint",
|
"name": "markdownlint",
|
||||||
"version": "0.17.1",
|
"version": "0.17.2",
|
||||||
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
||||||
"main": "lib/markdownlint.js",
|
"main": "lib/markdownlint.js",
|
||||||
"author": "David Anson (https://dlaa.me/)",
|
"author": "David Anson (https://dlaa.me/)",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# 2019-10-19
|
# 2019-10-24
|
||||||
default.css
|
default.css
|
||||||
default.htm
|
default.htm
|
||||||
default.js
|
default.js
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "markdownlint",
|
"name": "markdownlint",
|
||||||
"version": "0.17.1",
|
"version": "0.17.2",
|
||||||
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
||||||
"main": "lib/markdownlint.js",
|
"main": "lib/markdownlint.js",
|
||||||
"author": "David Anson (https://dlaa.me/)",
|
"author": "David Anson (https://dlaa.me/)",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue