Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdownlint

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint - npm Package Compare versions

Comparing version 0.20.3 to 0.20.4

2

CONTRIBUTING.md

@@ -46,3 +46,3 @@ # Contributing

Once accepted, the tag `fixed in next` will be added to the issue.
When the commit is merged to `master` branch during the release process, the issue will be closed automatically.
When the commit is merged to the main branch during the release process, the issue will be closed automatically.
(See [Closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/) for details.)

@@ -189,2 +189,4 @@ # Rules

Fixable: Most violations can be fixed by tooling
This rule is triggered when list items are parsed as being at the same level,

@@ -244,2 +246,4 @@ but don't have the same indentation:

Fixable: Most violations can be fixed by tooling
This rule is triggered when top level lists don't start at the beginning of a

@@ -292,2 +296,4 @@ line:

Fixable: Most violations can be fixed by tooling
This rule is triggered when list items are not indented by the configured

@@ -336,2 +342,4 @@ number of spaces (default: 2).

Fixable: Most violations can be fixed by tooling
This rule is triggered on any lines that end with unexpected whitespace. To fix this,

@@ -379,2 +387,4 @@ remove the trailing space from the end of the line.

Fixable: Most violations can be fixed by tooling
This rule is triggered by any lines that contain hard tab characters instead

@@ -415,2 +425,4 @@ of using spaces for indentation. To fix this, replace any hard tab characters

Fixable: Most violations can be fixed by tooling
This rule is triggered when text that appears to be a link is encountered, but

@@ -448,2 +460,4 @@ where the syntax appears to have been reversed (the `[]` and `()` are

Fixable: Most violations can be fixed by tooling
This rule is triggered when there are multiple consecutive blank lines in the

@@ -531,2 +545,4 @@ document:

Fixable: Most violations can be fixed by tooling
This rule is triggered when there are code blocks showing shell commands to be

@@ -583,2 +599,4 @@ typed, and *all* of the shell commands are preceded by dollar signs ($):

Fixable: Most violations can be fixed by tooling
This rule is triggered when spaces are missing after the hash characters

@@ -612,2 +630,4 @@ in an atx style heading:

Fixable: Most violations can be fixed by tooling
This rule is triggered when more than one space is used to separate the

@@ -642,2 +662,4 @@ heading text from the hash characters in an atx style heading:

Fixable: Most violations can be fixed by tooling
This rule is triggered when spaces are missing inside the hash characters

@@ -673,2 +695,4 @@ in a closed atx style heading:

Fixable: Most violations can be fixed by tooling
This rule is triggered when more than one space is used to separate the

@@ -708,2 +732,4 @@ heading text from the hash characters in a closed atx style heading:

Fixable: Most violations can be fixed by tooling
This rule is triggered when headings (any style) are either not preceded or not

@@ -751,2 +777,4 @@ followed by at least one blank line:

Fixable: Most violations can be fixed by tooling
This rule is triggered when a heading is indented by one or more spaces:

@@ -874,2 +902,4 @@

Fixable: Most violations can be fixed by tooling
This rule is triggered on any heading that has one of the specified normal or

@@ -905,2 +935,4 @@ full-width punctuation characters as the last character in the line:

Fixable: Most violations can be fixed by tooling
This rule is triggered when blockquotes have more than one space after the

@@ -931,2 +963,4 @@ blockquote (`>`) symbol:

Fixable: Most violations can be fixed by tooling
This rule is triggered when two blockquote blocks are separated by nothing

@@ -1068,2 +1102,4 @@ except for a blank line:

Fixable: Most violations can be fixed by tooling
This rule checks for the number of spaces between a list marker (e.g. '`-`',

@@ -1142,2 +1178,4 @@ '`*`', '`+`' or '`1.`') and the text of the list item.

Fixable: Most violations can be fixed by tooling
This rule is triggered when fenced code blocks are either not preceded or not

@@ -1190,2 +1228,4 @@ followed by a blank line:

Fixable: Most violations can be fixed by tooling
This rule is triggered when lists (of any kind) are either not preceded or not

@@ -1258,2 +1298,4 @@ followed by a blank line:

Fixable: Most violations can be fixed by tooling
This rule is triggered whenever a URL is given that isn't surrounded by angle

@@ -1394,2 +1436,4 @@ brackets:

Fixable: Most violations can be fixed by tooling
This rule is triggered when emphasis markers (bold, italic) are used, but they

@@ -1433,2 +1477,4 @@ have spaces between the markers and the text:

Fixable: Most violations can be fixed by tooling
This rule is triggered for code span elements that have spaces adjacent to the

@@ -1473,2 +1519,4 @@ backticks:

Fixable: Most violations can be fixed by tooling
This rule is triggered on links that have spaces surrounding the link text:

@@ -1666,2 +1714,4 @@

Fixable: Most violations can be fixed by tooling
This rule is triggered when any of the strings in the `names` array do not have

@@ -1760,2 +1810,4 @@ the specified capitalization. It can be used to enforce a standard letter case

Fixable: Most violations can be fixed by tooling
This rule is triggered when there is not a single newline character at the end of a file.

@@ -1762,0 +1814,0 @@

@@ -24,3 +24,3 @@ // @ts-check

// Regular expressions for range matching
module.exports.bareUrlRe = /(?:http|ftp)s?:\/\/[^\s\]"']*/ig;
module.exports.bareUrlRe = /(?:http|ftp)s?:\/\/[^\s\]"']*(?:\/|[^\s\]"'\W])/ig;
module.exports.listItemMarkerRe = /^([\s>]*)(?:[*+-]|\d+[.)])\s+/;

@@ -27,0 +27,0 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;

{
"name": "markdownlint-rule-helpers",
"version": "0.10.0",
"version": "0.11.0",
"description": "A collection of markdownlint helper functions for custom rules",

@@ -5,0 +5,0 @@ "main": "helpers.js",

@@ -131,3 +131,5 @@ // @ts-check

// next marker (ex: "**star**_underscore_")
emphasisRe.lastIndex--;
if (emphasisRe.lastIndex > 1) {
emphasisRe.lastIndex--;
}
} else if (emphasisRe.lastIndex > 1) {

@@ -134,0 +136,0 @@ // Back up one character so RegExp has a chance to match the

@@ -8,2 +8,5 @@ // @ts-check

const startNonWordRe = /^\W/;
const endNonWordRe = /\W$/;
module.exports = {

@@ -20,3 +23,6 @@ "names": [ "MD044", "proper-names" ],

const escapedName = escapeForRegExp(name);
const namePattern = "\\S*\\b(" + escapedName + ")\\b\\S*";
const startNamePattern = startNonWordRe.test(name) ? "" : "\\S*\\b";
const endNamePattern = endNonWordRe.test(name) ? "" : "\\b\\S*";
const namePattern =
`(${startNamePattern})(${escapedName})(${endNamePattern})`;
const anyNameRe = new RegExp(namePattern, "gi");

@@ -30,25 +36,22 @@ // eslint-disable-next-line jsdoc/require-jsdoc

while ((match = anyNameRe.exec(line)) !== null) {
const fullMatch = match[0];
const [ fullMatch, leftMatch, nameMatch, rightMatch ] = match;
if (fullMatch.search(bareUrlRe) === -1) {
const wordMatch = fullMatch
.replace(/^\W*/, "").replace(/\W*$/, "");
.replace(new RegExp(`^\\W{0,${leftMatch.length}}`), "")
.replace(new RegExp(`\\W{0,${rightMatch.length}}$`), "");
if (!names.includes(wordMatch)) {
const lineNumber = token.lineNumber + index + fenceOffset;
const fullLine = params.lines[lineNumber - 1];
let matchIndex = match.index;
const matchLength = wordMatch.length;
const fullLineWord =
fullLine.slice(matchIndex, matchIndex + matchLength);
if (fullLineWord !== wordMatch) {
// Attempt to fix bad offset due to inline content
matchIndex = fullLine.indexOf(wordMatch);
}
const matchIndex = fullLine.indexOf(wordMatch);
const range = (matchIndex === -1) ?
null :
[ matchIndex + 1, matchLength ];
const fixInfo = (matchIndex === -1) ? null : {
"editColumn": matchIndex + 1,
"deleteCount": matchLength,
"insertText": name
};
const fixInfo = (matchIndex === -1) ?
null :
{
"editColumn": matchIndex + 1,
"deleteCount": matchLength,
"insertText": name
};
addErrorDetailIf(

@@ -58,3 +61,3 @@ onError,

name,
match[1],
nameMatch,
null,

@@ -61,0 +64,0 @@ null,

{
"name": "markdownlint",
"version": "0.20.3",
"version": "0.20.4",
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",

@@ -5,0 +5,0 @@ "main": "lib/markdownlint.js",

@@ -35,10 +35,17 @@ # markdownlint

* [markdownlint-cli command-line interface for Node.js](https://github.com/igorshubovych/markdownlint-cli)
* [grunt-markdownlint for the Grunt task runner](https://github.com/sagiegurari/grunt-markdownlint)
* [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint)
* [Sublime Text markdownlint for Sublime Text](https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint)
* [linter-node-markdownlint extension for Atom](https://atom.io/packages/linter-node-markdownlint)
* [coc-markdownlint extension for Vim/Neovim](https://github.com/fannheyward/coc-markdownlint)
* [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl)
* [Cake.Markdownlint addin for Cake build automation system](https://github.com/cake-contrib/Cake.Markdownlint)
* CLI
* [markdownlint-cli command-line interface for Node.js](https://github.com/igorshubovych/markdownlint-cli)
* GitHub
* [GitHub Super-Linter Action](https://github.com/github/super-linter)
* [GitHub Actions problem matcher for markdownlint-cli](https://github.com/xt0rted/markdownlint-problem-matcher)
* Editor
* [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint)
* [Sublime Text markdownlint for Sublime Text](https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint)
* [linter-node-markdownlint extension for Atom](https://atom.io/packages/linter-node-markdownlint)
* [coc-markdownlint extension for Vim/Neovim](https://github.com/fannheyward/coc-markdownlint)
* Tooling
* [grunt-markdownlint for the Grunt task runner](https://github.com/sagiegurari/grunt-markdownlint)
* [Cake.Markdownlint addin for Cake build automation system](https://github.com/cake-contrib/Cake.Markdownlint)
* Ruby
* [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl)

@@ -203,3 +210,3 @@ ## Demonstration

* Confiure: `<!-- markdownlint-configure-file { options.config JSON } -->`
* Configure: `<!-- markdownlint-configure-file { options.config JSON } -->`

@@ -869,2 +876,3 @@ For example:

* 0.20.3 - Fix regression in MD037, improve MD044, add automatic regression testing.
* 0.20.4 - Fix regression in MD037, improve MD034/MD044, improve documentation.

@@ -871,0 +879,0 @@ [npm-image]: https://img.shields.io/npm/v/markdownlint.svg

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc