From: Katsumi Yamaoka Date: Tue, 29 Nov 2016 10:20:51 +0000 (+0000) Subject: shr.el: Don't render a normal table twice X-Git-Tag: emacs-26.0.90~1251 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e42b964c1246562a7c2345e528bd0a2fe5448015;p=emacs.git 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). --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 75e55801864..8b1495e72bd 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 clause is found in the children ;; of DOM, and becomes (t . t) if a or a clause is found ;; and the car is t then. When a 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
. (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)))