Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for file links #171

Closed
jjmdg opened this issue Oct 17, 2016 · 7 comments · Fixed by #353 or #354
Closed

Add support for file links #171

jjmdg opened this issue Oct 17, 2016 · 7 comments · Fixed by #353 or #354

Comments

@jjmdg
Copy link

jjmdg commented Oct 17, 2016

Support for links like \share\directory\file.pdf and file:///\share\directory\file.pdf would be nice (especially for use in a business context).

@jjmdg jjmdg closed this as completed Oct 17, 2016
@jjmdg
Copy link
Author

jjmdg commented Oct 17, 2016

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

@jjmdg jjmdg reopened this Oct 20, 2016
@jjmdg
Copy link
Author

jjmdg commented Oct 20, 2016

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.

@MurzNN
Copy link

MurzNN commented Jul 11, 2017

Problem with not-working file:// links in browsers easily solved via extensions or via pre-configured settings:

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.

@MurzNN
Copy link

MurzNN commented Jul 11, 2017

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.

@chrysn
Copy link

chrysn commented Oct 14, 2020

Since RFC8089, both the file:/etc/motd and the file:///etc/motd versions are in use for local URIs.

@nfrasser nfrasser added this to the 3.0 milestone Mar 11, 2021
@nfrasser nfrasser mentioned this issue Mar 11, 2021
@DSheffield
Copy link

I ran into this issue as well. Any idea when V3.0 will be ready?

nfrasser added a commit that referenced this issue Oct 11, 2021
* Refactor scanner to emit more granular tokens

The DOMAIN token (among others) has been removed in favour of WORD, UWORD and other tokens. SCHEME (formerly PROTOCOL) tokens now come in several flavours. Includes additional facilities for token groups, which will be useful for future plugins down the line

Also fixes file URL behaviour

* Update plugins to use new scanner tokens

Also improves hashtag and mention plugin accuracy

* Update tests to work with new scanner

* Better workspace packages to improve build order

* Update benchmark require

* Remove resolved FIXME

* Additional tests for linkify register functions

Fixes #171
Fixes #245
Fixes #351
@nfrasser nfrasser mentioned this issue Oct 11, 2021
@nfrasser nfrasser modified the milestones: 3.0, 4.0 Oct 14, 2021
@nfrasser nfrasser self-assigned this Oct 14, 2021
@nfrasser
Copy link
Owner

Links that begin with file: are now supported in the latest Linkify v4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants