From: Tim Vaughan Date: Sat, 25 May 2019 11:36:25 +0000 (+0200) Subject: Better handling of terminating period in gopher map files. X-Git-Tag: v1.1.0~4 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=527c5051a981e0d4b9bdb16b38452e1afad6fe42;p=elpher.git Better handling of terminating period in gopher map files. --- diff --git a/elpher.el b/elpher.el index 30ec292..ff69c93 100644 --- a/elpher.el +++ b/elpher.el @@ -291,7 +291,8 @@ content and cursor position fields of the node." ;; Should be able to split directly on CRLF, but some non-conformant ;; LF-only servers sadly exist, hence the following. (dolist (line (split-string (replace-regexp-in-string "\r" "" string) "\n")) - (unless (= (length line) 0) + (unless (or (= (length line) 0) + (string-equal line ".")) (elpher-insert-index-record line)))) (defun elpher-insert-margin (&optional type-name) @@ -342,7 +343,6 @@ content and cursor position fields of the node." 'action #'elpher-click-url 'follow-link t 'help-echo (format "mouse-1, RET: open url %s" url)))) - (?.) ;; Occurs at end of index, can safely ignore. (tp (elpher-insert-margin (concat (char-to-string tp) "?")) (insert (propertize display-string 'face 'elpher-unknown-face)))))