Skip to content

Commit

Permalink
do not use java 15 lang feature
Browse files Browse the repository at this point in the history
  • Loading branch information
erdos committed Nov 3, 2023
1 parent 70c24c8 commit 2930123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stencil/merger.clj
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@
(fn [rf]
(let [builder (new java.lang.StringBuilder)]
(fn ([acc]
(if (.isEmpty builder)
(if (empty? builder)
(rf acc)
(rf (rf acc {:text (str builder)}))))
([acc x]
(if (char? x)
(do (.append builder x) acc)
(if (.isEmpty builder)
(if (empty? builder)
(rf acc x)
(let [new-node {:text (str builder)}]
(.delete builder 0 (.length builder))
Expand Down

0 comments on commit 2930123

Please sign in to comment.