mirror of
https://github.com/theoludwig/markdownlint-rule-relative-links.git
synced 2025-05-27 11:37:24 +02:00
fix: should only check valid fragments in markdown (.md) files
This commit is contained in:
@ -97,6 +97,10 @@ const customRule = {
|
||||
continue
|
||||
}
|
||||
|
||||
if (!url.pathname.endsWith(".md")) {
|
||||
continue
|
||||
}
|
||||
|
||||
const fileContent = fs.readFileSync(url, { encoding: "utf8" })
|
||||
const headings = getMarkdownHeadings(fileContent)
|
||||
const idOrAnchorNameHTMLFragments =
|
||||
|
Reference in New Issue
Block a user