diff --git a/scripts/tags/exturl.js b/scripts/tags/exturl.js index 901a9cef4a..4a0b7784a4 100644 --- a/scripts/tags/exturl.js +++ b/scripts/tags/exturl.js @@ -38,11 +38,13 @@ function extURL(args, content) { // Delete link URL and text from arguments args = args.slice(i + 1); - // Check if the link should be open in a new window - // and collect the last text as the link title + // If any arguments exists, collect the last text as the link title, + // if not, set title as url. if (args.length) { var shift = args[0]; title = args.join(' '); + } else { + title = item; } var attrs = { @@ -51,7 +53,6 @@ function extURL(args, content) { title: title }; - //console.log(url); return htmlTag('span', attrs, text.join(' ')); }