Permalink
Browse files

keep more formatting for extracted function.

  • Loading branch information...
1 parent 9ae6a97 commit 99f406d446f319f974f7af39db4ac53cec38d50d @joodie committed Nov 4, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/clojure_refactoring/extract_method.clj
@@ -51,12 +51,14 @@
(defn- make-fn-node [name args body]
"Creates an ast representing the new function"
- (format-ast
- (ast/list-without-whitespace
- (ast/symbol 'defn)
+ (ast/list
+ [(ast/symbol 'defn)
+ ast/whitespace
name
+ (ast/make-node :whitespace ["\n "])
(ast/vector args)
- (ast/strip-whitespace body))))
+ (ast/make-node :whitespace ["\n "])
+ body]))
(defn call-extracted [body toplevel extracted]
(ast/tree-replace

0 comments on commit 99f406d

Please sign in to comment.