fix: should only check valid fragments in markdown (.md) files

This commit is contained in:
theoludwig committed 2024-01-31 00:10:41 +01:00
1 parent 5c39afbe20
commit e20ee54b05
5 files changed
+25

No files matched your search

+4
View File
@@ -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 =