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

is_uri is too lax, e.g. timestamps are false positives #44

Closed
kurinoku opened this issue Jan 29, 2022 · 1 comment
Closed

is_uri is too lax, e.g. timestamps are false positives #44

kurinoku opened this issue Jan 29, 2022 · 1 comment

Comments

@kurinoku
Copy link

I understand why is it coded like that, it's very effective, but, when it comes to some naming conventions like timestamps, for example some-series-i-was-watching.mkv_[00:19:35.257].png gets interpreted as a uri

@mwh mwh closed this as completed in 5b5c0e5 Jan 29, 2022
@mwh
Copy link
Owner

mwh commented Jan 29, 2022

This fix will resolve your exact case, but without the _ and [] it would still be a plausible URI and create a URI button. When that happens, ./some-file-10:30 will still always unambiguously be treated as a local file and create a file button.

It's possible the default should have been the other way around when a file with the given name is found in the current directory, regardless of how it looks. That would technically be a breaking change, though unlikely to cause any problem in practice. A drawback would be that there is no workaround to force URL treatment in the way that there is one to force file treatment. For the moment, ./xy:z will always avoid the issue.

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

No branches or pull requests

2 participants