diff --git a/index.js b/index.js index 461bb5c..77a602d 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,11 @@ const dirPath = argv[2] || "."; function recurseElement(report, el) { if (el.name === "a") { if (el.attribs.href) { - checkUrl(report, "link", el, el.attribs.href); + if (isHttp(el.attribs.href)) { + report.infos.push(`HTTP/S link: ${getHtml(el)}`); + } else if (isAbsolute(el.attribs.href)) { + report.warnings.push(`Absolute link: ${getHtml(el)}`); + } } else { report.warnings.push(`Link with no href: ${getHtml(el)}`); } @@ -64,6 +68,7 @@ function processFile(content) { } else { let report = { warnings: [], + infos: [], }; for (const el of dom) { if (el.type === "tag") {