Improve behavior of boolean attributes
This commit is contained in:
parent
c393b70231
commit
f1fd511ac4
1 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,8 @@
|
||||||
(defmethod print-object ((attrs elm:attrs) stream)
|
(defmethod print-object ((attrs elm:attrs) stream)
|
||||||
(loop
|
(loop
|
||||||
:for (key . value) :in (elm:attrs-alist attrs)
|
: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~]"
|
||||||
" ~a=~s")
|
" ~a=~s")
|
||||||
(string-downcase key)
|
(string-downcase key)
|
||||||
|
|
Loading…
Reference in a new issue