1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Tweak the eww readability function

* lisp/net/eww.el (eww-highest-readability): Require that the
readable bit is at least 100 words (bug#30445).
This commit is contained in:
Lars Ingebrigtsen 2018-04-13 00:13:17 +02:00
parent 254f5021aa
commit f8db783d09

View file

@ -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