Skip to content

Commit

Permalink
slurp backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Jun 10, 2024
1 parent 91954dd commit c579066
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src-shared/nextjournal/clojure_mode/commands.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@
-1
(let [^string edge (n/left-edge-with-prefix state parent)
start (n/start (n/with-prefix parent))]
[{:from start
:to (+ start (count edge))
:insert " "}
[(cond-> {:from start
:to (+ start (count edge))}
(not str?) (j/assoc! :insert " "))
{:from (n/start target)
:insert edge}]))}))))))))

Expand Down
3 changes: 2 additions & 1 deletion test/nextjournal/clojure_mode_tests.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@
"('xy|z 1) 2" 1 "('xy|z 1 2)"
"'ab|c 1" 1 "'ab|c 1"

"\"x|\" 1" 1 "\"x| 1\""))
"\"x|\" 1" 1 "\"x| 1\""
"1 \"x|\"" -1 "\"1 x|\""))

#?(:squint nil
:cljs
Expand Down

0 comments on commit c579066

Please sign in to comment.