X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elpher.el;h=3c8db4a8925798a778d55befc127797eea937091;hp=f2ea9874043d3bd7d8770314196f248ef455d949;hb=8c6839a51a399ccb45fd2c9d7387bf324eb38a67;hpb=119e298777b89072794799dcb12b0d77ce8f441b diff --git a/elpher.el b/elpher.el index f2ea987..3c8db4a 100644 --- a/elpher.el +++ b/elpher.el @@ -1151,11 +1151,8 @@ by HEADER-LINE." This function uses Emacs' auto-fill to wrap text sensibly to a maximum width defined by elpher-gemini-max-fill-width." (insert (elpher-process-text-for-display text-line)) - (let* ((prefix-end-idx (string-match "[^ \t*]" text-line)) - (fill-prefix (if prefix-end-idx - (let ((raw-prefix (substring text-line 0 prefix-end-idx))) - (replace-regexp-in-string "\*" " " raw-prefix)) - nil))) + (let* ((prefix-end-idx (string-match "^[ \t]*\\(\*+[ \t]\\)?" text-line)) + (fill-prefix (replace-regexp-in-string "\*" " " (match-string 0 text-line)))) (newline))) (defun elpher-render-gemini-map (data _parameters)