diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/net/eww.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 34cb02c24ac..6a8400320c2 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -669,11 +669,13 @@ the like." (setq score (- (length (split-string (dom-text node)))))) (t (dolist (elem (dom-children node)) - (if (stringp elem) - (setq score (+ score (length (split-string elem)))) + (cond + ((stringp elem) + (setq score (+ score (length (split-string elem))))) + ((consp elem) (setq score (+ score (or (cdr (assoc :eww-readability-score (cdr elem))) - (eww-score-readability elem)))))))) + (eww-score-readability elem))))))))) ;; Cache the score of the node to avoid recomputing all the time. (dom-set-attribute node :eww-readability-score score) score)) |