From: Lars Ingebrigtsen Date: Thu, 12 Apr 2018 22:13:17 +0000 (+0200) Subject: Tweak the eww readability function X-Git-Tag: emacs-27.0.90~5270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8db783d097081d8a679a82c3a748ffb7976c4c1;p=emacs.git Tweak the eww readability function * lisp/net/eww.el (eww-highest-readability): Require that the readable bit is at least 100 words (bug#30445). --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 66b1767b563..9490d319226 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -731,7 +731,10 @@ the like." most-negative-fixnum) (or (dom-attr result :eww-readability-score) most-negative-fixnum)) - (setq result highest))) + ;; We set a lower bound to how long we accept that the + ;; readable portion of the page is going to be. + (when (> (length (split-string (dom-texts highest))) 100) + (setq result highest)))) result)) (defvar eww-mode-map