code: function(text, base) {
        var matches = [];
        var matched, u;
        while ((matched = this.regex.exec(text))) {
          u = new URL(matched[1], base);
          matches.push({matched: matched[0], url: u.href});
        }
        return matches;
      }
docs: TODO(dfreedm): there may be a better factoring here extract absolute urls from the text (full of relative urls)