]> git.eshelyaron.com Git - emacs.git/commitdiff
Support HTTPS links in newsticker extra elements
authorStefan Kangas <stefankangas@gmail.com>
Wed, 25 Oct 2023 21:26:37 +0000 (23:26 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 25 Oct 2023 21:26:37 +0000 (23:26 +0200)
* lisp/net/newst-reader.el (newsticker--do-print-extra-element):
Support HTTPS links.

lisp/net/newst-reader.el

index 9ec0b39567528f84926207a8996c8777ca3eb714..3c79304d8dd60d8743bc5f7131871c3006632617 100644 (file)
@@ -237,7 +237,8 @@ for formatting."
     (cond ((listp contents)
            (mapc (lambda (i)
                    (if (and (stringp i)
-                            (string-match "^http://.*" i))
+                            (string-match
+                             (rx bol "http" (? "s") "://" (* nonl)) i))
                        (let ((pos (point)))
                          (insert i " ") ; avoid self-reference from the
                                         ; nt-link thing
@@ -248,7 +249,7 @@ for formatting."
                                 'help-echo
                                 (format "mouse-2: visit (%s)" i)
                                 'keymap keymap)))
-                         (insert (format "%s" i))))
+                     (insert (format "%s" i))))
                  contents))
           (t
            (insert (format "%s" contents))))