function extractTextUrlFromTag(tag, ctx, warnOnMissingUrl = false) {
  // the following regex matches cases of:
  // "External Links http://someurl.com/" -> "External Links"
  // "External https://someurl.com/" -> "External"
  // "Id href #some_Some-method" -> "Id href"
  // "Local Absolute /docs/somewhere" -> "Local Absolute"
  // "No Href" -> "No Href"
  // "https://someurl.com" -> "" (fallback added)
  // "Some#Method #something" -> "Some#Method"
  // "Test ./somewhere" -> "Test"
  // "Test2 ./somewhere#andsomewhere" -> "Test2"
  // The remainder is simply taken by a call to "slice" (also the text is trimmed later)
  const textMatches = /^(.*? (?=#|\/|(?:https?:)|\.\/|$))/i.exec(tag.string);

  let text = undefined;
  let url = undefined;
  if (textMatches === null || textMatches === undefined) {
    if (warnOnMissingUrl) {
      // warn for the cases where URL should be defined (like in "@see")
      console.warn(`No Text Matches found in tag for "${ctx.constructor}.${ctx.name}"`);
    }

    // if no text is found, add text as url and use the url itself as the text
    url = tag.string;
    text = tag.string;
  } else {
    text = textMatches[1].trim();
    url = tag.string.slice(text.length).trim();
  }

  return {
    text: text || 'No Description', // fallback text, so that the final text does not end up as a empty element that cannot be seen
    url: url || undefined // change to be "undefined" if text is empty or non-valid
  };
}
Extract the Text and Url from a description if any
@param {Tag} tag The tag to process the resulting object from
@param {PropContext} ctx The current ctx for warnings
@param {Boolean} warnOnMissingUrl Warn if the url is missing, false by default
@returns {{ text: string, url: string }}