Skip to content

Conversation

@ferdinand-beyer
Copy link
Contributor

@ferdinand-beyer ferdinand-beyer commented Feb 17, 2025

Compiling an element whose tag is non-literal (e.g. a symbol) and that has non-literal vector children, led to the child form to be emitted unevaluated.

Reproducing example:

(let [tag :p, text "x"]
  (str (hiccup/html [tag [:span text]])))
;; => "<p>(clojure.core/let [attrs_or_content__74605 text attrs?__74606 (clojure.core/map? attrs_or_content__74605) content?__74607 (clojure.core/and (clojure.core/not attrs?__74606) (clojure.core/some? attrs_or_content__74605))] (hiccup.compiler/build-string \"<\" \"span\" (if attrs?__74606 (hiccup.compiler/render-attr-map (clojure.core/merge {} attrs_or_content__74605)) \"\") \">\" (clojure.core/when content?__74607 (hiccup.compiler/render-html attrs_or_content__74605)) \"</span>\"))</p>"

This seems to be a regression from #207.

@weavejester
Copy link
Owner

Thanks! I'll merge and release a new RC (hopefully the last!). There's a typo in your commit message though - "let" instead of "led" - could you quickly fix that?

@ferdinand-beyer
Copy link
Contributor Author

ferdinand-beyer commented Feb 17, 2025

Oops! On it! Done!

Compiling an element with a non-literal tag led to unevaluated code
being emitted.
@ferdinand-beyer
Copy link
Contributor Author

@weavejester -- you are probably busy and I don't mean to rush you. Just checking in if there's something else you'd like me to add? Should I create a CHANGELOG entry, for example?

@weavejester
Copy link
Owner

No, thanks fine. Thanks for the reminder.

@weavejester weavejester merged commit e8150f7 into weavejester:master Feb 21, 2025
1 check passed
@ferdinand-beyer ferdinand-beyer deleted the runtime-tag branch February 21, 2025 12:02
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

Successfully merging this pull request may close these issues.

2 participants