docs: def nofollow_callback(attrs, new=False):
      """
      Turn relative links into external ones and avoid `nofollow` for us,
  
      otherwise add `nofollow`.
      That callback is not splitted in order to parse the URL only once.
      """
      parsed_url = urlparse(attrs[(None, 'href')])
      if parsed_url.netloc in ('', current_app.config['SERVER_NAME']):
          attrs[(None, 'href')] = '{scheme}://{netloc}{path}'.format(
              scheme='https' if request.is_secure else 'http',
              netloc=current_app.config['SERVER_NAME'],
              path=parsed_url.path)
          return attrs
      else:
          rel = [x for x in attrs.get((None, 'rel'), '').split(' ') if x]
          if 'nofollow' not in [x.lower() for x in rel]:
              rel.append('nofollow')
          attrs[(None, 'rel')] = ' '.join(rel)
          return attrs