Comment

Comment by sillysaurusx

I absolutely adore that this link isn't clickable, yet it works when you copy-paste it into Chrome.

@dang, here's an updated version of valid-url which will make the link clickable:

  (defmemo valid-url (url)
    (and (len> url 10)
         (or (begins url "http://")
             (begins url "https://")
             (begins url "ftp://"))
         (~find [in _ #\< #\> #\" #\'] url)))
I doubt it'll get merged, but you never know.

It looks like the other change necessary is in the `markdown` function. It checks:

  (and (or (litmatch "http://" s i) 
           (litmatch "https://" s i)
You'd need to add:

           (litmatch "ftp://" s i)
If you grep the codebase for "https" then it'll reveal any other functions that need updates, but these are the only two in arc3.1.

Of course, the cost-benefit doesn't quite add up here – it's not like ftp links are too common. But think of the poor university FTP servers! They'll be forever doomed to copy-paste-hell unless this is fixed. :-(

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton