Hi,
while playing around with rendering to *output-stream* versus rendering to a string, I got the following:
CL-USER> (use-package :cl-markup)
T
CL-USER> (markup (:ul (loop for item in '(1 2 3) collect (markup (:li item)))))
"<ul><li>1</li><li>2</li><li>3</li></ul>"
CL-USER> (let ((*output-stream* t))
(markup (:ul (loop for item in '(1 2 3) collect (markup (:li item))))))
<ul><li>1</li><li>2</li><li>3</li></li></li></li></ul>
"</ul>"
CL-USER>
Note the additional and unexpected closing tags </li> in the second output.
Is this invalid client code or a bug?
If it is a bug, perhaps the expansion under the (IF *OUTPUT-STREAM* regime should generate a PROGN that contains NIL as its last form.
In the above example, the last form of the PROGN is (WRITE-STRING "</li>" *OUTPUT-STREAM*).
Hi,
while playing around with rendering to
*output-stream*versus rendering to a string, I got the following:Note the additional and unexpected closing tags
</li>in the second output.Is this invalid client code or a bug?
If it is a bug, perhaps the expansion under the
(IF *OUTPUT-STREAM*regime should generate aPROGNthat containsNILas its last form.In the above example, the last form of the
PROGNis(WRITE-STRING "</li>" *OUTPUT-STREAM*).