summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-02-05 20:34:16 +0100
committermathieui <mathieui@mathieui.net>2021-02-05 20:34:16 +0100
commit3b7e5f93bdc649fd65a3b7d301a90fe56b6c918e (patch)
tree9d98e65d0ae6383ed54a79ed89e4dabaa6674abe /plugins
parent46d90bf8324e4612cbe2aee2e7eeb441ed1a2617 (diff)
downloadpoezio-3b7e5f93bdc649fd65a3b7d301a90fe56b6c918e.tar.gz
poezio-3b7e5f93bdc649fd65a3b7d301a90fe56b6c918e.tar.bz2
poezio-3b7e5f93bdc649fd65a3b7d301a90fe56b6c918e.tar.xz
poezio-3b7e5f93bdc649fd65a3b7d301a90fe56b6c918e.zip
link plugin: fix regex for aesgcm and add gemini&gopher
Diffstat (limited to 'plugins')
-rw-r--r--plugins/link.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/link.py b/plugins/link.py
index 4961d5ef..699215ea 100644
--- a/plugins/link.py
+++ b/plugins/link.py
@@ -87,8 +87,17 @@ from poezio.xhtml import clean_text
from poezio import common
from poezio import tabs
-url_pattern = re.compile(r'\b(?:http[s]?://(?:\S+))|(?:magnet:\?(?:\S+))|(?:aesgcm://(?:\Z+))\b',
- re.I | re.U)
+url_pattern = re.compile(
+ r'\b'
+ '(?:http[s]?://(?:\S+))|'
+ '(?:magnet:\?(?:\S+))|'
+ '(?:aesgcm://(?:\S+))|'
+ '(?:gopher://(?:\S+))|'
+ '(?:gemini://(?:\S+))'
+ '\b',
+ re.I | re.U
+)
+
app_mapping = {
'Linux': 'xdg-open',
'Darwin': 'open',