Permalink
Browse files

Added !-marks to show that highlight-code etc has side effects

  • Loading branch information...
1 parent 023eda2 commit ba4380a34655cd4ceb1b1ae42043c5719750d786 @pascalc committed Jul 8, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/cljs/ttmachines/client/util.cljs
View
8 src/cljs/ttmachines/client/util.cljs
@@ -73,22 +73,22 @@
;; Code highlighting
-(defn code-highlight [code-str target-id]
+(defn code-highlight! [code-str target-id]
(when-let [element (.getElementById js/document target-id)]
(.runMode js/CodeMirror
code-str "clojure" element)))
-(defn highlight-code-nodes []
+(defn highlight-code-nodes! []
(doseq [code-node (dom/nodes (css/sel ".clojure"))]
(dom/set-attr! code-node :id "_clojure_code_")
- (code-highlight
+ (code-highlight!
(dom/text code-node)
"_clojure_code_")
(dom/remove-attr! code-node :id)))
(dispatch/react-to #{:switch-page} {:priority 5}
(fn [_ _]
- (highlight-code-nodes)))
+ (highlight-code-nodes!)))
;; Truncate lazy-seqs when printng if they exceed LAZY-SEQ-LIMIT

0 comments on commit ba4380a

Please sign in to comment.