mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Tweak range of MD042/no-empty-links to include link destination.
This commit is contained in:
parent
5fa065a7b0
commit
16dc230d54
3 changed files with 15 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ var atxClosedHeaderSpaceRe = /(?:^#+\s\s+?\S)|(?:\S\s\s+?#+\s*$)/;
|
||||||
var atxHeaderSpaceRe = /^#+\s*\S/;
|
var atxHeaderSpaceRe = /^#+\s*\S/;
|
||||||
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/;
|
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/;
|
||||||
var dollarCommandRe = /^(\s*)(\$\s)/;
|
var dollarCommandRe = /^(\s*)(\$\s)/;
|
||||||
var emptyLinkRe = /\[[^\]]*](?=(?:\((?:#?|(?:<>))\))|(?:\[[^\]]*]))/;
|
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))|(?:\[[^\]]*])/;
|
||||||
var htmlRe = /<[^>]*>/;
|
var htmlRe = /<[^>]*>/;
|
||||||
var listItemMarkerRe = /^[\s>]*(?:[*+-]|\d+\.)\s+/;
|
var listItemMarkerRe = /^[\s>]*(?:[*+-]|\d+\.)\s+/;
|
||||||
var listItemMarkerInterruptsRe = /^[\s>]*(?:[*+-]|1\.)\s+/;
|
var listItemMarkerInterruptsRe = /^[\s>]*(?:[*+-]|1\.)\s+/;
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,6 @@ Not a header
|
||||||
|
|
||||||
An [empty]() link
|
An [empty]() link
|
||||||
|
|
||||||
|
An [empty](#) link with fragment
|
||||||
|
|
||||||
This is a test file for the MARKDOWNLINT package.
|
This is a test file for the MARKDOWNLINT package.
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,19 @@
|
||||||
"ruleDescription": "No empty links",
|
"ruleDescription": "No empty links",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[empty]",
|
"errorContext": "[empty]",
|
||||||
"errorRange": [4, 7]
|
"errorRange": [4, 9]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 5,
|
||||||
|
"ruleName": "MD042",
|
||||||
|
"ruleAlias": "no-empty-links",
|
||||||
|
"ruleDescription": "No empty links",
|
||||||
|
"errorDetail": null,
|
||||||
|
"errorContext": "[empty]",
|
||||||
|
"errorRange": [4, 10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 8,
|
||||||
"ruleName": "MD043",
|
"ruleName": "MD043",
|
||||||
"ruleAlias": "required-headers",
|
"ruleAlias": "required-headers",
|
||||||
"ruleDescription": "Required header structure",
|
"ruleDescription": "Required header structure",
|
||||||
|
|
@ -27,7 +36,7 @@
|
||||||
"errorRange": null
|
"errorRange": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 7,
|
||||||
"ruleName": "MD044",
|
"ruleName": "MD044",
|
||||||
"ruleAlias": "proper-names",
|
"ruleAlias": "proper-names",
|
||||||
"ruleDescription": "Proper names should have the correct capitalization",
|
"ruleDescription": "Proper names should have the correct capitalization",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue