From b710f36774de2a7291d25c0c0a36484aa95f8284 Mon Sep 17 00:00:00 2001 From: cage Date: Tue, 15 Nov 2022 20:29:56 +0100 Subject: [PATCH] - allowed also collection of gopher address, printed on the message window, in the link window. --- etc/shared.conf | 4 ++++ src/text-utils.lisp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/shared.conf b/etc/shared.conf index 9474571..c4c990a 100644 --- a/etc/shared.conf +++ b/etc/shared.conf @@ -87,6 +87,10 @@ color-regexp = "-> gemini://[^ ]+" yellow underline color-regexp = "gemini://[^ ]+" #ff0000 +#gopher links + +color-regexp = "gopher://[^ ]+" #ff0000 + # (c) and (r) color-regexp = "(?i)(\\(c\\))|(\\(r\\))" #ff0000 bold diff --git a/src/text-utils.lisp b/src/text-utils.lisp index 022b783..7d30978 100644 --- a/src/text-utils.lisp +++ b/src/text-utils.lisp @@ -698,7 +698,7 @@ printed in the box column by column; in the example above the results are: (list columns))))) (fit))) -(defun collect-links (text &optional (schemes '("http" "https" "ftp" "gemini"))) +(defun collect-links (text &optional (schemes '("http" "https" "ftp" "gemini" "gopher"))) "Collect all hyperlinks in a text marked from a list of valid `schemes'" (flet ((build-re-scheme () (let ((res ""))