File tree 3 files changed +5
-15
lines changed
src-shared/nextjournal/clojure_mode
3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 136
136
137
137
(def log js /console.log )
138
138
139
+ (defn ->str [x]
140
+ (js/JSON.stringify (str x)))
141
+
139
142
(defn slurp [direction]
140
143
(fn [^js state]
141
144
(u/update-ranges state
151
154
(let [str? (n/string? parent)]
152
155
(when-let [target (case direction 1 (first (remove n/line-comment? (n/rights (n/with-prefix parent))))
153
156
-1 (first (remove n/line-comment? (n/lefts (n/with-prefix parent)))))]
154
- (js/console.log :target target)
155
157
{:cursor/mapped from
156
158
:changes (case direction
157
159
1
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 249
249
" (<a) b>" " <(a) b>"
250
250
))
251
251
252
- (deftest slurp
252
+ (deftest slurp-test
253
253
(are [input dir expected]
254
254
(= (apply-f (commands/slurp dir) input) expected)
255
255
" (|) a" 1 " (|a)"
273
273
" ('xy|z 1) 2" 1 " ('xy|z 1 2)"
274
274
" 'ab|c 1" 1 " 'ab|c 1"
275
275
276
- " \" x|\" 1" 1 " \" x1 \" " ))
276
+ " \" x|\" 1" 1 " \" x| 1 \" " ))
277
277
278
278
#?(:squint nil
279
279
:cljs
You can’t perform that action at this time.
0 commit comments