summaryrefslogtreecommitdiff
path: root/plugins/link.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/link.py')
-rw-r--r--plugins/link.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/link.py b/plugins/link.py
index d4929d1a..699215ea 100644
--- a/plugins/link.py
+++ b/plugins/link.py
@@ -76,7 +76,7 @@ Options
Set the default browser started by the plugin
.. _Unix FIFO: https://en.wikipedia.org/wiki/Named_pipe
-.. _daemon.py: https://lab.louiz.org/poezio/poezio/raw/master/poezio/daemon.py
+.. _daemon.py: https://lab.louiz.org/poezio/poezio/raw/main/poezio/daemon.py
"""
import platform
@@ -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+))\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',