emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e42b964: shr.el: Don't render a normal table twice


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master e42b964: shr.el: Don't render a normal table twice
Date: Tue, 29 Nov 2016 10:21:15 +0000 (UTC)

branch: master
commit e42b964c1246562a7c2345e528bd0a2fe5448015
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    shr.el: Don't render a normal table twice
    
    * lisp/net/shr.el (shr-collect-extra-strings-in-table):
    Don't render a table if it is called for the first time,
    IOW, recognize it to never be invalid (bug#25051).
---
 lisp/net/shr.el |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 75e5580..8b1495e 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1917,7 +1917,7 @@ flags that control whether to collect or render objects."
   ;; FLAGS becomes (t . nil) if a <tr> clause is found in the children
   ;; of DOM, and becomes (t . t) if a <td> or a <th> clause is found
   ;; and the car is t then.  When a <table> clause is found, FLAGS
-  ;; becomes nil if the cdr is t then.  But if the cdr is nil then,
+  ;; becomes nil if the cdr is t then.  But if FLAGS is (t . nil) then,
   ;; it renders the <table>.
   (cl-loop for child in (dom-children dom) with recurse with tag
           do (setq recurse nil)
@@ -1945,10 +1945,10 @@ flags that control whether to collect or render 
objects."
                 else if (eq tag 'table)
                   if (cdr flags)
                     do (setq flags nil)
-                  else
+                  else if (car flags)
                     do (setq recurse nil)
                        (shr-tag-table child)
-                  end end end end end end end end end
+                  end end end end end end end end end end
           when recurse
             append (shr-collect-extra-strings-in-table child flags)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]