From f1fd511ac4720f202d3adde3df8727efbaba9b96 Mon Sep 17 00:00:00 2001 From: paku Date: Tue, 12 Mar 2024 15:03:36 +0900 Subject: [PATCH] Improve behavior of boolean attributes --- src/generator.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generator.lisp b/src/generator.lisp index 2a0f5dd..7eed5eb 100644 --- a/src/generator.lisp +++ b/src/generator.lisp @@ -39,7 +39,8 @@ (defmethod print-object ((attrs elm:attrs) stream) (loop :for (key . value) :in (elm:attrs-alist attrs) - :do (format stream (if (boolean-attr-key-p key) + :do (format stream (if (and (boolean-attr-key-p key) + (typep value 'boolean)) "~@[ ~a~]" " ~a=~s") (string-downcase key)