Updated the auto-linking code¹ on my website last Sunday to handle a few more @-mention use-cases.

In particular:
* @-domains with dashes/hyphens like @sonja-weckenmann.de
* @-@ with (some) Unicode alphabetic characters like @briansuda@loðfíll.is
* @-domain-and-path for indicating @-mentions of silo profiles that don’t support @-@ syntax, like @flickr.com/people/tantek or @instagram.com/tantek

I also dropped auto-linking of URLs with user:password "userinfo", since they’ve been long abandoned and effectively deprecated because there’s fairly wide agreement that such basic HTTP authentication² was poorly designed and should not be used (and thus should not be linked).

If you’re curious you can take a look at https://tantek.com/cassis.js, which has updated functions:
* auto_link_re() — regular expression to recognize URLs, @-mentions, @-@, and footnotes to link
* auto_link() — specifically the code to recognize different kinds of @-@ and @-mentions and link them properly to profiles, domains, and paths.

This code is only live on my website (testing in production³ as it were) for now, and you’re welcome to copy/paste to experiment with it. I plan to test it more over the coming weeks (or so) and when I feel it is sufficiently well tested, will update it on GitHub as well.

With this additional auto-linking functionality, I feel I have a fairly complete implementation of how to auto-link various URLs and @-mentions, and plan to write that up at least as a minimal “list of use-cases and how they should work” auto-linking specification.

This (blog post) is my contribution to today’s #IndieWebCamp Brighton #hackday!

This was originally a project I wanted to complete during IndieWebCamp Nuremberg last October, however I was pre-occupied at the time with fixing other things.

#autolink #atmention #atmentions #atat #atatmention

This is post 12 of #100PostsOfIndieWeb. #100Posts


¹ https://tantek.com/cassis.js
² https://en.wikipedia.org/wiki/Basic_access_authentication
³ https://indieweb.org/test_in_production

on (ttk.me t5Vs1) using BBEdit