Commit ab657bab authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Make titles in eww prettier

(eww-tag-title): Remove newlines and extra whitespace from the
displayed title.
parent 029788db
......@@ -7,6 +7,8 @@
go back to the non-readable version.
(eww-display-html): Don't try to decode the text if we've been
passed in a pre-parsed DOM.
(eww-tag-title): Remove newlines and extra whitespace from the
displayed title.
2014-11-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
......
......@@ -350,6 +350,10 @@ word(s) will be searched for via `eww-search-prefix'."
(dolist (sub cont)
(when (eq (car sub) 'text)
(setq eww-current-title (concat eww-current-title (cdr sub)))))
(setq eww-current-title
(replace-regexp-in-string
"^ \\| $" ""
(replace-regexp-in-string "[ \t\r\n]+" " " eww-current-title)))
(eww-update-header-line-format))
(defun eww-tag-body (cont)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment