-
Notifications
You must be signed in to change notification settings - Fork 20
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
URL detection #76
Comments
and once again I update the URL regex :D but thanks for the report - I think we slowly get to the point where all strange cases are included |
I am "URL" champion. 🥇 |
Off-topic |
I created a new issue for this: That way it's easier for me to keep track of things, because closed issues don't appear in the github overview - even if they have new comments.
Yeah - new issues are always better :D - it's just more organized that way |
Fine, I will keep this in mind.
Thank you very much! |
I am afraid that the URLs I mentioned above are not detected in version 1.6.23, screen: Can you confirm this? |
Ah damnit - that minus sign is not a minus sign but an EN_DASH:
I guess I will add all the EN/EM Dash stuff to the regex too (perhaps the whole unicode punctuation class) By they way: What unholy browser do you all use that lets you copy such links?
[Edit] Perhaps I should just give up on intelligent URL parsing and allow all characters except whitespace? |
I do not know. Actually the dashes are tricky:
In fact even white spaces can be part of the URLs, a couple of examples:
The same URLs copied by the 'normal' way look 'normal' too:
The unholy browser (I agree it is unholy, in fact for me all browsers are unholy now) is pre-Quantum version of Firefox, but I copy the URL using an add-on (UrlbarExt) which produces better-looking links for pasting. |
Okay that explains it a bit. I changed the URL matching now to only abort once a whitespace is found.
But I guess there is not really an optimal solution. But if anyone is unsatisfied with the new regex, there is now a setting under the advanced section where you can change the URL matching mode:
Okay but that is the one thing I really can't support - if I accepted spaces as valid URL parts then all URLs would only end at the end of the line (and you could even argue to accept a line break in URLs). |
The problem seems really insolvable. I think that I prefer URL not to be detected than the closing parenthesis to be recognized as part of the URL. However I would like to show you slightly different behaviour- ResophNotes does not recognize the opening parenthesis as part of URLs, screen: What do you think? |
Hmm it seems like ResophNotes forces the URL to start with an whitespace (or BeginOfLine) I guess I could add this also - I currently can't think of a situation where this would make more problems than the current syntax Btw: Opening and closing parenthesis are valid URL components ( according to the original RFC ) |
AlephNote cannot detect some URLs, screen:
ResophNotes detects the same URLs just fine, screen:
Example URLs:
The text was updated successfully, but these errors were encountered: