Skip to content

Commit

Permalink
use opening tag directly in compilable elem attr absent case
Browse files Browse the repository at this point in the history
  • Loading branch information
onionpancakes committed Feb 25, 2024
1 parent f634ea8 commit 7bebfde
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/dev/onionpancakes/chassis/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,10 @@
(let [metadata (meta elem)
head (nth elem 0)
opening (c/make-opening-tag metadata head nil)
tag (.-tag opening)
head-id (.-head-id opening)
head-class (.-head-class opening)]
tag (.-tag opening)]
(if (and (c/void-tag? tag) (<= (count elem) 1))
[(c/->OpeningTag metadata tag head-id head-class nil)]
[(c/->OpeningTag metadata tag head-id head-class nil)
[opening]
[opening
(c/content-subvec elem 1)
(c/->ClosingTag metadata tag)])))

Expand Down

0 comments on commit 7bebfde

Please sign in to comment.