]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor readability parsing issues with SVC images
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 3 Nov 2014 22:54:16 +0000 (23:54 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 3 Nov 2014 22:54:16 +0000 (23:54 +0100)
* net/eww.el (eww-score-readability): Parse SVC images correctly.

* net/shr.el: Ditto.

lisp/ChangeLog
lisp/net/eww.el
lisp/net/shr.el

index 445cef9c8c9e204c6a44e9f552779191eb9eedc9..ec62f4df58b86a9f83d16ad18728d7aa7af3fad7 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/eww.el (eww-score-readability): Parse SVC images correctly.
+
+       * net/shr.el: Ditto.
+
 2014-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Assume that
index 705d79cdb77e2f208f6dd37a3018a07fb9e3c975..0f074696404b61675826d45629d067b89555cc0c 100644 (file)
@@ -459,7 +459,8 @@ the like."
      (t
       (dolist (elem (cdr node))
        (cond
-        ((eq (car elem) 'text)
+        ((and (stringp (cdr elem))
+              (eq (car elem) 'text))
          (setq score (+ score (length (split-string (cdr elem))))))
         ((consp (cdr elem))
          (setq score (+ score
index a369d68c974f31a105f5d234c6a5598eb931222d..7cd1e65fc902f454309f9995270cf4858976a65c 100644 (file)
@@ -377,7 +377,8 @@ size, and full-buffer size."
        (sub-nodes nil))
     (dolist (elem (cdr dom))
       (cond
-       ((eq (car elem) 'text)
+       ((and (stringp (cdr elem))
+            (eq (car elem) 'text)
        (push (cdr elem) sub-nodes))
        ((not (listp (cdr elem)))
        (push (cons (intern (substring (symbol-name (car elem)) 1) obarray)