Permalink
Browse files

started organizing transform.clj more

  • Loading branch information...
1 parent 598e769 commit 6cd6578b872a4ae8b0064091d77762b9c010dfab @jeyoor committed Feb 21, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/testify/process/transform.clj
@@ -72,19 +72,20 @@
"take one user-script transformation statement and apply it to the given HTML nodes"
[nodes transform]
`(let [selector# (process-selector (first ~transform))
- funame# (process-fname (second ~transform))
+ funame# (second ~transform)
+ fusym# (process-fname (second ~transform))
args# (nth ~transform 2)]
;;TODO: check and transform args based on function used
(cond
;;check for content, append, prepend,
(need-nodes? funame#)
(html/transform
~nodes (vec selector#)
- ((load-string (str "html/" funame#))(html/html-snippet args#)))
+ (fusym# (html/html-snippet args#)))
:else
(html/transform
~nodes (vec selector#)
- ((load-string (str "html/" funame#)) args#)))))
+ (fusym# args#)))))
;;;;Transformation operations

0 comments on commit 6cd6578

Please sign in to comment.