Skip to content
Permalink
Browse files

Handles broken links better

  • Loading branch information...
davidmerfield committed Aug 29, 2019
1 parent 4e75a80 commit 5c448333b4cfbcf8329c61edbc43a748df11babd
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/util/broken.js
@@ -69,6 +69,10 @@ function main(url, options, callback) {

$("[href],[src]").each(function() {
var url = $(this).attr("href") || $(this).attr("src");

if (!url)
return;

url = require("url").resolve(base, url);

if (require("url").parse(url).host !== require("url").parse(base).host)

0 comments on commit 5c44833

Please sign in to comment.
You can’t perform that action at this time.