This commit is contained in:
paku 2024-05-27 15:23:14 +09:00
parent e18c9097e2
commit 145c01a7c4

View file

@ -32,7 +32,7 @@
(defparameter *builtin-elements* (make-hash-table))
(defmacro define-and-export-builtin-elements (&body names)
(defmacro define-and-export-builtin-elements (&rest names)
`(progn
,@(mapcan (lambda (name)
(list `(defhsx ,name ,(string-downcase name))
@ -41,8 +41,8 @@
names)))
(define-and-export-builtin-elements
; tag-elements
a abbr address area article aside audio b base bdi bdo blockquote
; tag-elements
a abbr address area article aside audio b base bdi bdo blockquote
body br button canvas caption cite code col colgroup data datalist
dd del details dfn dialog div dl dt em embed fieldset figcaption
figure footer form h1 h2 h3 h4 h5 h6 head header hr i iframe
@ -68,9 +68,9 @@
(defmacro hsx (form)
(modify-first-of-lists form
#'builtin-element-p
(lambda (node)
(find-symbol (string node) :hsx/hsx))))
#'builtin-element-p
(lambda (node)
(find-symbol (string node) :hsx/hsx))))
(defun modify-first-of-lists (tree test result)
(if tree