arohner / scriptjure

a Clojure library for generating javascript
187 stars 15 forks source link

Semicolon not automagically added in single (var ...) expression #3

Closed gilesc closed 14 years ago

gilesc commented 14 years ago

Hi there, scriptjure is a really cool idea and has been quite helpful.

Using [scriptjure "0.1.11"] from clojars.

The documentation says -- and I'd expect -- (js (var x 3)) to return "var x = 3;" but it actually returns "var x = 3", without the semicolon. The semicolon is added when you have multiple forms nested within the (js ...) macro, but not when you have only one. It is a minor nuisance, but since I regularly use scriptjure to generate a single JSON data structure, it is a recurring one.

arohner commented 14 years ago

Fixed in 0.1.12