Closed grimnebulin closed 7 years ago
If I run (elquery-read-file "test.html") when test.html contains the text:
(elquery-read-file "test.html")
test.html
<p x="x" y="y">
...then I get an error:
Debugger entered--Lisp error: (wrong-type-argument listp "x") append((:x . "x") (:y) "y") (setq acc (append acc (list (elquery--to-kw (car it))) (cdr it))) (let ((it (car list))) (setq acc (append acc (list (elquery--to-kw (car it))) (cdr it)))) (while list (let ((it (car list))) (setq acc (append acc (list (elquery--to-kw (car it))) (cdr it)))) (setq it-index (1+ it-index)) (setq list (cdr list))) (let ((list (cdr list-value)) (it-index 0)) (while list (let ((it (car list))) (setq acc (append acc (list (elquery--to-kw (car it))) (cdr it)))) (setq it-index (1+ it-index)) (setq list (cdr list)))) (let ((acc (car list-value))) (let ((list (cdr list-value)) (it-index 0)) (while list (let ((it (car list))) (setq acc (append acc (list (elquery--to-kw ...)) (cdr it)))) (setq it-index (1+ it-index)) (setq list (cdr list)))) acc) (if list-value (let ((acc (car list-value))) (let ((list (cdr list-value)) (it-index 0)) (while list (let ((it (car list))) (setq acc (append acc (list ...) (cdr it)))) (setq it-index (1+ it-index)) (setq list (cdr list)))) acc) (let (acc it) (append acc (list (elquery--to-kw (car it))) (cdr it)))) (let ((list-value (cons (quote nil) list))) (if list-value (let ((acc (car list-value))) (let ((list (cdr list-value)) (it-index 0)) (while list (let ((it ...)) (setq acc (append acc ... ...))) (setq it-index (1+ it-index)) (setq list (cdr list)))) acc) (let (acc it) (append acc (list (elquery--to-kw (car it))) (cdr it))))) elquery--alist-to-plist(((x . "x") (y . "y")))
(many more stack frames elided)
If the p tag has only the attribute x or y, the parse succeeds.
p
x
y
Fixed in 13e88d46
If I run
(elquery-read-file "test.html")
whentest.html
contains the text:...then I get an error:
(many more stack frames elided)
If the
p
tag has only the attributex
ory
, the parse succeeds.