Skip to content

Commit

Permalink
keep more formatting for extracted function.
Browse files Browse the repository at this point in the history
  • Loading branch information
joodie committed Nov 4, 2011
1 parent 9ae6a97 commit 99f406d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/clojure_refactoring/extract_method.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99f406d

Please sign in to comment.