Closed faeredia closed 3 years ago
Looks like the comment
function in run.lisp
also doubles the closing -->
under certain conditions.
(defun example ()
(with-html-string
(:html
(:!-- "something"))))
returns
"<html lang=en>
<!-- something -->
</html>"
but, calling it with
(let ((spinneret::*print-pretty* nil)) (example))
returns
"<html lang=en><!-- something --> --></html>"
Note the double closing -->
.
Seems to boil down to the use of format
, which returns nil
, and write-string
, which returns the string written.
So the comment
function in run.lisp
could be fixed by returning (values)
as well
Thanks for catching this. If you'd like to make a pull request (ideally with tests) I'd be happy to merge it.
:CDATA is doubling up on the closing
]]>
. The following example:Returns
Note the additional cdata-end (the closing > converted to >)
Changing the definition of
cdata
inrun.lisp
to return(values)
results in the expected behaviour (no double cdata-end)Not sure yet why the return value of
cdata
is being written