-
Notifications
You must be signed in to change notification settings - Fork 162
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-parsing includes closing squarebrackets, also when the openen one is before #405
Comments
This patch implements a match registry that can provide a set of different regular expressions to be registered in the terminal. This not only allows us to perform correct matching of more complex URLs but also file links, email addresses, VoIP links, man pages and numbers. LICENSE NOTES This includes code taken from gnome-terminal, which is licensed under GPLv3. According to the [compatibility matrix][1] of the GNU GPL license FAQ this means that existing code in tilda can remain "GPLv2 or later" licensed, but the combined code is now licensed under "GPLv3 or later". Fixes: #405 [1]: https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
This patch implements a match registry that can provide a set of different regular expressions to be registered in the terminal. This not only allows us to perform correct matching of more complex URLs but also file links, email addresses, VoIP links, man pages and numbers. Fixes: #405
I have been working an update of the matching code which you can find on the The matching code now detects the typo of the matched token and updates the context menu according to the match type. Depending on the type it is possible to copy the matched token or also open it. |
tried to compile..
|
I removed the |
compiling worked.. eventually link-klicking is broken? |
I added a change which requires that the control key is pressed when a link is clicked. That has been requested in another bug for some time. This change should help to avoid accidentally clicking on the link when trying to copy some text, but it also makes it a bit less discoverable. For the record, here is a snipped I used to test the matching functionality, that contains examples for Number, URL without schema, URL with Schema, email without prefix, email with mailto prefix and a file URI:
You probably already noticed that the labels adjust and change between Open ... and Send .... Also the Send option is omitted for the number match, which means the context menu is one entry smaller for number matches than for other matches and two entries smaller if no match is detected. I am still considering to always show all entries but make them deactivated to ensure the context menu always has the same size. Let me know if you have any preferences. |
i think, users are very diverse. Maybe it's a good choice to not declare for all, but implement option to modify? this would reflect different workflows of people. |
Added configurable options for the context menu in commit 37aacb1. |
nice.. but at first i meant this:
😃 |
Issue #368 tracks match activation handling, I have pushed a commit to master to fix that issue. |
This patch implements a match registry that can provide a set of different regular expressions to be registered in the terminal. This not only allows us to perform correct matching of more complex URLs but also file links, email addresses, and numbers. Fixes: #405
@demlak I have rebased this branch on master and cleaned up the code a little. It now also properly handles OSC 8 hyperlinks (i.e. |
Awesome! |
Pushed with a few small modifications:
This is now in master. Thanks for helping to test this. |
Hi,
i'm using tilda 1.5.0 and when there are urls detected, the detection does not reflect beginning of square brackets before URL.
for example
here.. the link! [https://fdsgdf.com/gfhsjfg/fdh/hfjkdg] take a look!
is detected as
https://fdsgdf.com/gfhsjfg/fdh/hfjkdg]
i'm not sure if this is a real bug.. or just not realy good to handle
The text was updated successfully, but these errors were encountered: