diff options
| author | Lars Ingebrigtsen | 2018-04-13 00:13:17 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-04-13 00:14:32 +0200 |
| commit | f8db783d097081d8a679a82c3a748ffb7976c4c1 (patch) | |
| tree | 0881af25808a42da1780d53ed763500c87cff016 | |
| parent | 254f5021aa75c161c964bd5f31b957d69814f38f (diff) | |
| download | emacs-f8db783d097081d8a679a82c3a748ffb7976c4c1.tar.gz emacs-f8db783d097081d8a679a82c3a748ffb7976c4c1.zip | |
Tweak the eww readability function
* lisp/net/eww.el (eww-highest-readability): Require that the
readable bit is at least 100 words (bug#30445).
| -rw-r--r-- | lisp/net/eww.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 731 | most-negative-fixnum) | 731 | most-negative-fixnum) |
| 732 | (or (dom-attr result :eww-readability-score) | 732 | (or (dom-attr result :eww-readability-score) |
| 733 | most-negative-fixnum)) | 733 | most-negative-fixnum)) |
| 734 | (setq result highest))) | 734 | ;; We set a lower bound to how long we accept that the |
| 735 | ;; readable portion of the page is going to be. | ||
| 736 | (when (> (length (split-string (dom-texts highest))) 100) | ||
| 737 | (setq result highest)))) | ||
| 735 | result)) | 738 | result)) |
| 736 | 739 | ||
| 737 | (defvar eww-mode-map | 740 | (defvar eww-mode-map |