On Thu, Nov 5, 2009 at 4:57 PM, jan <jan.mare...@gmail.com> wrote: > John Harrop <jharrop...@gmail.com> writes: > > > The following, which I relinquish into the public domain and certify is > > original to me, takes a string and reformats it as Clojure code, > returning a > > string. It behaves similarly to the Enclojure reformatter, but: > > 1. Outside string literals and comments, it will take care of all > > spacing. > > 2. Comments get one space before and one after the ; before the > > comment text. If the comment text originally started with a space > > none is inserted after the ;. > > 3. If two comments are on successive lines and the second can be > > aligned with the first by inserting additional spaces before the > > ;, the comments are aligned in this manner; exception to item 2. > > it doesn't handle these comments gracefully > > (format-code > ";;; header comment > (defn test-comments [] > ;; whole line comment > :thing)")
Meh. I haven't tended to use multiple ; in a row. I can make it group them together but it'll be a little more work. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---