Add support for file links
Support for links like \share\directory\file.pdf and file:///\share\directory\file.pdf would be nice (especially for use in a business context).
Not possible: http://stackoverflow.com/questions/5246292/open-local-folder-from-link Producing downloadable links (could be a solution) is probably not in scope for linkify
Could still be implemented so that the user can easily copy the address and paste it to his system. It works like that in Confluence for example.
Problem with not-working file:// links in browsers easily solved via extensions or via pre-configured settings:
- Firefox settings: https://stackoverflow.com/a/13083926/1395757
- Firefox extension: https://addons.mozilla.org/en-US/firefox/addon/local-filesystem-links/?src=search
- Chrome extension: https://chrome.google.com/webstore/detail/local-explorer-file-manag/eokekhgpaakbkfkmjjcbffibkencdfkl
So linkifyjs must only mark file:///home/user/file.txt text as <a href> links, all other work will be done on browser and system side. If we don't want to enable it by default, make this optionally.
At now library already support file:// links with two slashes, but fails with linux-style links contains 3 slashes: file:///home/user/file.txt - here is example:
> const lfy = require('linkifyjs');
undefined
...
> lfy.find('file:///test');
[]
> lfy.find('file://test');
[ { type: 'url', value: 'file://test', href: 'file://test' } ]
So, at first, we must fix the bug with file:///test.
Since RFC8089, both the file:/etc/motd and the file:///etc/motd versions are in use for local URIs.
I ran into this issue as well. Any idea when V3.0 will be ready?
Links that begin with file: are now supported in the latest Linkify v4.0