Fix self-closing-p
This commit is contained in:
parent
ff8ecada91
commit
b7fc422294
1 changed files with 8 additions and 9 deletions
|
@ -122,15 +122,14 @@ When given :ASCII and :ATTR, it's possible to insert html text as a children, e.
|
||||||
(format stream " ~{~a=~s~^ ~}" (alist-plist (attrs-alist attrs)))
|
(format stream " ~{~a=~s~^ ~}" (alist-plist (attrs-alist attrs)))
|
||||||
(format stream "")))
|
(format stream "")))
|
||||||
|
|
||||||
(defun self-closing-p (element)
|
(defparameter *self-closing-tags*
|
||||||
(gethash (if (symbolp element)
|
'(area base br col embed hr img input keygen
|
||||||
element
|
link meta param source track wbr))
|
||||||
(intern (string-downcase element) #.*package*))
|
|
||||||
#.(let ((self-closing-tags (make-hash-table)))
|
(defun self-closing-p (tag)
|
||||||
(loop :for tag :in '(area base br col embed hr img input keygen
|
(member (make-symbol (string-upcase tag))
|
||||||
link meta param source track wbr)
|
*self-closing-tags*
|
||||||
:do (setf (gethash tag self-closing-tags) tag))
|
:test #'string=))
|
||||||
self-closing-tags)))
|
|
||||||
|
|
||||||
(defmethod print-object ((element element) stream)
|
(defmethod print-object ((element element) stream)
|
||||||
(if (element-children element)
|
(if (element-children element)
|
||||||
|
|
Loading…
Reference in a new issue