An autolink is a hyperlink that was automatically added to some text to link that text to an obvious or useful destination, like hyperlinking a URL in plaintext to the URL itself, linking hashtags to search results, and @-names to their profile pages.
Hans Gerwitz renders notes with a Markdown processor that autolinks URLs for him at publish-time, but intends to implement view-time after suffering the pain of importing thousands of pre-processed notes from Twitter.
... many more ...
Feel free to add your site if you also support posting of notes with autolinking, and note since when.
There is a python version of the Cassis auto-link code too
On Publish Or View
It deserves consideration whether autolinking is applied at the time of publishing or the time of viewing.
In favor of publish-time:
- process once
- preserve author intent
In favor of view-time
- adapt to changing link targets
- allow for user preferences (e.g. what site should a #hashtag or @username link to?)
New ideas for autolinking to consider implementing.
Flight status and tracking
Flight codes could be auto-linked to the current (today's?) flight using two letter airline code and flight number e.g. (without requiring JS)
Or for a specific date by appending /YYYY/MM/DD to the end e.g.:
- Flight code: UA59
- Link to live status / map: https://flightaware.com/live/flight/UA59
- Useful if you know the flight is happening (via external information, or retrieval of
- Airline codes (IATA two letter, and three letter) https://en.wikipedia.org/wiki/List_of_airline_codes
- flight numbers seem to be 1-4 digits (0-9).
- Could probably construct a regex of 2-3 airline codes (uppercase only) followed by (optional space) followed by 1-4 digits (0-9)