Commit 01af3a58 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

* net/shr.el (shr-retransform-dom): Allow several text sub-nodes.

parent ab657bab
......@@ -374,12 +374,11 @@ size, and full-buffer size."
"Transform the shr DOM back into the libxml DOM."
(let ((tag (car dom))
(attributes nil)
(text nil)
(sub-nodes nil))
(dolist (elem (cdr dom))
(cond
((eq (car elem) 'text)
(setq text (cdr elem)))
(push (cdr elem) sub-nodes))
((not (consp (cdr elem)))
(push (cons (intern (substring (symbol-name (car elem)) 1) obarray)
(cdr elem))
......@@ -387,8 +386,7 @@ size, and full-buffer size."
(t
(push (shr-retransform-dom elem) sub-nodes))))
(append (list tag (nreverse attributes))
(nreverse sub-nodes)
(and text (list text)))))
(nreverse sub-nodes))))
(defsubst shr-generic (cont)
(dolist (sub cont)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment