From a6921ecbf975ae32008c7b18f437d3f3b4773d6e Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 30 Jun 2015 11:10:47 +0100 Subject: [PATCH] Tidying up after ACREP-32. Remove another extraneous warning from URL analysis. Warn when seeing a so-called link that is not a valid URL. --- src/mkws-widget-main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index e539e6d..f1b13e0 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -140,12 +140,13 @@ mkws.registerWidgetType('records', function() { } var urls = hit['md-electronic-url']; - that.warn("urls = " + mkws.$.toJSON(urls)); var bestLink = null; var otherLinks = []; for (var j = 0; j < urls.length; j++) { var url = urls[j]; - if (!bestLink && url.match(/^(https?:)?\/\//)) { + if (!url.match(/^(https?:)?\/\//)) { + that.warn("link '" + url + "' is not a valid URL"); + } else if (!bestLink) { bestLink = url; } else { otherLinks.push(url); -- 1.7.10.4