Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need of a "nil" body to close a tag #11

Closed
vindarel opened this issue Jan 30, 2017 · 1 comment
Closed

Need of a "nil" body to close a tag #11

vindarel opened this issue Jan 30, 2017 · 1 comment

Comments

@vindarel
Copy link

vindarel commented Jan 30, 2017

Hi,

edit: I was traped by something not identified in this message.

it wasn't obvious to me that tags are not closed if they have no body:

(markup (:br))
;=> "<br />"

whereas

(markup (:br nil))
;=> "<br></br>"

This can be an issue for html generation and is surely a trap easy to fall into.

It doesn't help to set the style:

(eval-when (:compile-toplevel :load-toplevel :execute)
  (setf *markup-language* :html))
(markup (:p))
;; => "<p>" (and nothing closing)

So am I doing sthg wrong and is it possible to have auto-closing tags with no body ?

@vindarel vindarel closed this as completed Feb 1, 2017
@erjoalgo
Copy link

It would be helpful if this was included as part of the README. Some html tags e.g. textarea, seem to require explict closing tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants