Skip to content

hiccup/html behaves differently with literal or let-bound value #158

@nha

Description

@nha

Please consider the following snippet:

(let [c {}]
  (str (hiccup/html c))) ;; "{}"
(str (hiccup/html {})) ;; ""

I am not sure what should be the output here (possibly "", since {} doesn't look like valid html to me), but I would expect both snippets to render the same output.

Adding an explicit {} first parameter makes them render both "{}"

(let [c {}]
  (str (hiccup/html {} c))) ;; "{}"

(str (hiccup/html {} {})) ;; "{}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions