The Future of AutoLinker
We've added a few useful features to auto_linker
(mentions, tld validation, etc) and fixed some critical bugs (for example it didn't parse links inside nested html).
I feel it should be available for the elixir community.
But sadly it seems like the original auto_linker is not maintained anymore: the last commit was in January 2018 and also 5 months ago I've opened a PR with tld validation and so far no response at all.
So I propose to publish our fork on Hex.
And if you agree, before publishing I think we should do some refactoring:
- Currently, it does not turn urls with a scheme to links by default (have to set
scheme: true
to link https://google.com otherwise it would link google.com only). Which I think is counter-intuitive for an auto-linking library. - Instead, we should add a setting like
no_scheme: false
to optionally disable parsing links without schema (#7). - Inconsistent use of HTML attribute quote symbols: some are
'
and some are"
. - Probably we need to remove markdown links (there are proper markdown parsers for that)
- TLD list maintenance. Currently, the list outdated. We should somehow automate it. For example, the list could be scraped from ICANN and released by a periodic CI job. Maybe separate this stuff into own package.
P.S. Package name ideas: pleroma_link, pleroma_linker, pleroma_linkify, pleroma_auto_link, linkify.
Edited by minibikini