Add fragment-p

This commit is contained in:
paku 2024-02-21 07:03:43 +09:00
parent ef1071404b
commit 2ae90c290e

View file

@ -232,6 +232,9 @@
(not (keywordp node)) (not (keywordp node))
(gethash (alx:make-keyword node) *builtin-elements*))) (gethash (alx:make-keyword node) *builtin-elements*)))
(defun fragment-p (node)
(string= node '<>))
(defun modify-first-leaves (tree test result) (defun modify-first-leaves (tree test result)
(if tree (if tree
(cons (let ((first-node (first tree))) (cons (let ((first-node (first tree)))
@ -252,6 +255,6 @@
,@(modify-first-leaves ,@(modify-first-leaves
body body
(lambda (node) (lambda (node)
(or (html-element-p node) (string= node '<>))) (or (html-element-p node) (fragment-p node)))
(lambda (node) (lambda (node)
(find-symbol (string-upcase node) :piccolo))))) (find-symbol (string-upcase node) :piccolo)))))