Correction de la détection de liens internes morts
This commit is contained in:
@@ -13,7 +13,7 @@ function isInternalLink(link) {
|
||||
}
|
||||
|
||||
function extractLinksFromLine(line) {
|
||||
const regex = /\]\(([^)]+)\)/g;
|
||||
const regex = /\]\(([^)"]+)\)/g;
|
||||
let match;
|
||||
const links = [];
|
||||
while ((match = regex.exec(line)) !== null) {
|
||||
@@ -97,6 +97,6 @@ function walk(dir) {
|
||||
if (BAD_LINKS.length === 0) {
|
||||
console.log("✅ No broken internal links found.");
|
||||
} else {
|
||||
console.table(BAD_LINKS.map(([f, u, l]) => ({ File: f, URL: u, Line: l })));
|
||||
console.table(BAD_LINKS.map(([f, u, l]) => ({ File: f + '#' + l, URL: u })));
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user