Skip to content

Commit 8c99812

Browse files
committed
testing: fix test-helper
Account for: multiple linebreaks are parsed into a single node
1 parent e699775 commit 8c99812

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/rewrite_clj/zip/test_helper.cljc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@
5252
rows 0]
5353
(if (not zloc)
5454
(inc rows)
55-
(if (or (z/linebreak? zloc) (n/comment? (z/node zloc)))
55+
(cond
56+
(z/linebreak? zloc)
57+
(recur (z/prev* zloc) (+ rows (z/length zloc)))
58+
59+
(n/comment? (z/node zloc))
5660
(recur (z/prev* zloc) (inc rows))
61+
62+
:else
5763
(recur (z/prev* zloc) rows)))))
5864

5965
(defn- col-num [zloc]

0 commit comments

Comments
 (0)