mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 04:47:34 +00:00
* net/shr.el (shr-retransform-dom): Allow several text sub-nodes.
This commit is contained in:
parent
ab657babf0
commit
01af3a585d
1 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue