File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 4
4
[rewrite-clj.node :as node]
5
5
[clojure.tools.reader
6
6
[edn :as edn]
7
- [reader-types :as r]]))
7
+ [reader-types :as r]]
8
+ [clojure.string :as string]))
8
9
9
10
(defn- flush-into
10
11
" Flush buffer and add string to the given vector."
38
39
39
40
(defn parse-regex
40
41
[reader]
41
- (let [[h & _] (read-string-data reader)]
42
- (node/token-node (re-pattern h ))))
42
+ (let [h (read-string-data reader)]
43
+ (node/token-node (re-pattern ( string/join " \n " h) ))))
Original file line number Diff line number Diff line change 118
118
?s ?p
119
119
" #\" regex\" " " regex"
120
120
" #\" regex\\ .\" " " regex\\ ."
121
- " #\" [reg|k].x\" " " [reg|k].x" )
121
+ " #\" [reg|k].x\" " " [reg|k].x"
122
+ " #\" a\\ nb\" " " a\\ nb"
123
+ " #\" a\n b\" " " a\n b" )
122
124
123
125
(tabular
124
126
(fact " about parsing strings"
You can’t perform that action at this time.
0 commit comments