From 8a40903db113ba6c4205267feeaae26ab2dd03ed Mon Sep 17 00:00:00 2001 From: Bruce Hauman Date: Mon, 25 Jun 2018 19:51:02 -0400 Subject: [PATCH] fix regex overflow for cljs repl fixes #161 --- rebel-readline-cljs/src/rebel_readline/cljs/repl.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rebel-readline-cljs/src/rebel_readline/cljs/repl.clj b/rebel-readline-cljs/src/rebel_readline/cljs/repl.clj index 5d54e7f..155aabc 100644 --- a/rebel-readline-cljs/src/rebel_readline/cljs/repl.clj +++ b/rebel-readline-cljs/src/rebel_readline/cljs/repl.clj @@ -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*]