Yeah, the only tricky bit is handling all of the options:
- toUrl: optional function which takes references as input and turns them into client-specific URIs
- imageLink: optional function which takes image
src
as input and returns ahref
to link-wrap with - emoji: optional function which takes emoji shortcode as input and returns HTML for an image
- protocols: optional array of protocols to linkify, defaults to HTTP(S) + FTP + Dat
- Dat support is broken in any URI parser because Dat identifiers aren't URIs
They're fine on their own, but often a bit of a hassle when interfacing with each other and different plugins and the various moving pieces that try to do URI encoding on our sigil link URLs. I tried to spike a quick implementation with Remark, but it ended up producing:
<a href="&nBmGtTlQew5bSiy5CwKA7Qz6Qfj6UYzmf9gYgcNg+90=.sha256">&nBmGtTlQew5bSiy5CwKA7Qz6Qfj6UYzmf9gYgcNg+90=.sha256</a></p>
🥴