mirror of
https://github.com/theoludwig/markdownlint-rule-relative-links.git
synced 2026-10-16 20:50:51 +02:00
fix: should only check valid fragments in markdown (.md) files
This commit is contained in:
5 files changed
+25
No files matched your search
@@ -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