Shinmera / plump

Practically Lenient and Unimpressive Markup Parser for Common Lisp
https://shinmera.github.io/plump
zlib License
120 stars 21 forks source link

[bug?] plump:serialize will not produce a forwardslash for tag "meta" #28

Closed Inc0n closed 4 years ago

Inc0n commented 4 years ago

I used the following snippet to reproduce the issue on my end:

(let ((root (plump:make-root)))
  (plump:set-attribute (plump:make-element root "meta")
                       "attri"
                       "1")
  (plump:serialize root)
  (format t "~%~%"))

And the output is as follows:

<meta attri="1">

There seems to be a forward slash missing. And the behavior is persistent if "meta" doesn't have any attributes.

This can be worked around with adding an additional text node with empty text, which will produce the following on plump:serialize:

<meta></meta>

It seems that this behavior only occur on tag "meta" so far.

Shinmera commented 4 years ago

This is how HTML requires things to work. You must bind the *tag-dispatchers* to *xml-tags* if you want XML output.