Skip to content

Commit

Permalink
fix regex overflow for cljs repl
Browse files Browse the repository at this point in the history
fixes #161
  • Loading branch information
Bruce Hauman committed Jun 25, 2018
1 parent 1fc9542 commit 8a40903
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rebel-readline-cljs/src/rebel_readline/cljs/repl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
See `rebel-readline-cljs.main` for an example of how this function is normally used"
[x]
(binding [*out* (.. api/*line-reader* getTerminal writer)]
(println (api/->ansi (clj-line-reader/highlight-clj-str (or x ""))))))
(try
(println (api/->ansi (clj-line-reader/highlight-clj-str (or x ""))))
(catch java.lang.StackOverflowError e
(println (or x ""))))))

;; enable evil alter-var-root
(let [cljs-repl* cljs.repl/repl*]
Expand Down

0 comments on commit 8a40903

Please sign in to comment.