markdownlint-rule-relative-links
Advanced tools
Comparing version 2.3.2 to 3.0.0
{ | ||
"name": "markdownlint-rule-relative-links", | ||
"version": "2.3.2", | ||
"version": "3.0.0", | ||
"public": true, | ||
@@ -50,16 +50,16 @@ "description": "Custom rule for markdownlint to validate relative links.", | ||
"devDependencies": { | ||
"@commitlint/cli": "19.1.0", | ||
"@commitlint/config-conventional": "19.1.0", | ||
"@types/markdown-it": "14.0.0", | ||
"@types/node": "20.12.5", | ||
"@commitlint/cli": "19.2.2", | ||
"@commitlint/config-conventional": "19.2.2", | ||
"@types/markdown-it": "14.1.1", | ||
"@types/node": "20.12.12", | ||
"editorconfig-checker": "5.1.5", | ||
"eslint": "8.56.0", | ||
"eslint-config-conventions": "14.1.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-conventions": "14.2.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"eslint-plugin-promise": "6.1.1", | ||
"eslint-plugin-unicorn": "51.0.1", | ||
"eslint-plugin-promise": "6.2.0", | ||
"eslint-plugin-unicorn": "53.0.0", | ||
"husky": "9.0.11", | ||
"lint-staged": "15.2.2", | ||
"lint-staged": "15.2.5", | ||
"markdownlint": "0.34.0", | ||
@@ -69,5 +69,5 @@ "markdownlint-cli2": "0.13.0", | ||
"prettier": "3.2.5", | ||
"semantic-release": "23.0.7", | ||
"typescript": "5.4.4" | ||
"semantic-release": "23.1.1", | ||
"typescript": "5.4.5" | ||
} | ||
} |
@@ -14,2 +14,3 @@ "use strict" | ||
getLineNumberStringFromFragment, | ||
lineFragmentRe, | ||
} = require("./utils.js") | ||
@@ -129,3 +130,3 @@ | ||
if (!fragmentsHTML.includes(url.hash.toLowerCase())) { | ||
if (!fragmentsHTML.includes(url.hash)) { | ||
if (url.hash.startsWith("#L")) { | ||
@@ -138,2 +139,6 @@ const lineNumberFragmentString = getLineNumberStringFromFragment( | ||
if (!hasOnlyDigits) { | ||
if (lineFragmentRe.test(url.hash)) { | ||
continue | ||
} | ||
onError({ | ||
@@ -158,2 +163,4 @@ lineNumber, | ||
} | ||
continue | ||
} | ||
@@ -160,0 +167,0 @@ |
@@ -7,2 +7,4 @@ const MarkdownIt = require("markdown-it") | ||
const lineFragmentRe = /^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/ | ||
/** | ||
@@ -30,3 +32,3 @@ * Converts a Markdown heading into an HTML fragment according to the rules | ||
.replace(/ /gu, "-"), | ||
).toLowerCase() | ||
) | ||
) | ||
@@ -156,2 +158,3 @@ } | ||
module.exports = { | ||
lineFragmentRe, | ||
convertHeadingToHTMLFragment, | ||
@@ -158,0 +161,0 @@ getMarkdownHeadings, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17960
320