(condition-case nil
(decode-coding-region (point) (point-max) encode)
(coding-system-error nil))
+ (save-excursion
+ ;; Remove CRLF before parsing.
+ (while (re-search-forward "\r$" nil t)
+ (replace-match "" t t)))
(libxml-parse-html-region (point) (point-max))))))
(source (and (null document)
(buffer-substring (point) (point-max)))))
(defun eww-toggle-fonts ()
"Toggle whether to use monospaced or font-enabled layouts."
(interactive)
- (message "Fonts are now %s"
- (if (setq shr-use-fonts (not shr-use-fonts))
- "on"
- "off"))
- (eww-reload))
+ (setq shr-use-fonts (not shr-use-fonts))
+ (eww-reload)
+ (message "Proportional fonts are now %s"
+ (if shr-use-fonts "on" "off")))
(defun eww-toggle-colors ()
"Toggle whether to use HTML-specified colors or not."