So if its just a URL without the []() syntax it would be, perhaps green, and links with it could stay blue. Good semantic to avoid spam or malware links.

Anyway, have any of you seen today’s XKCD? https://xkcd.com/3104

  • Björn Tantau@swg-empire.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I thought a bit more about it and I think instead of colouring URLs differently a better approach might be to colour []() in red if the label looks like a URL but is different from the actual URL.

    • KairosOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      What does “look like a URL” entail.

      • Björn Tantau@swg-empire.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        ^https?://[a-zA-Z0-9\.-]+(/[^\s]*)?$

        Been a while since I’ve written regex and it could certainly be a little bit more correct. But whatever Voyager already uses to find URLs in a text to turn into a link should suffice.

        • KairosOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          2 days ago

          Okay, now what if I put in an invisible Unicode character in there?

          • Björn Tantau@swg-empire.de
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            For that you strip the string to be tested of all non-ASCII chars before you run the regex.

            But I see what you mean. I just fear that if links could be shown in different equally non-threatening colors users wouldn’t know what to do with that information.