We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31e91f commit c3899acCopy full SHA for c3899ac
src/main/cljs/clojure/string.cljs
@@ -119,7 +119,7 @@
119
120
(defn- discard-trailing-if-needed
121
[limit v]
122
- (if (== 0 limit)
+ (if (and (== 0 limit) (< 1 (count v)))
123
(pop-last-while-empty v)
124
v))
125
src/test/cljs/cljs/core_test.cljs
@@ -3132,6 +3132,12 @@
3132
(is (= (hash-set Infinity -Infinity 0 1 2 3 4 5 6 7 8)
3133
(set (keys (zipmap [Infinity -Infinity 0 1 2 3 4 5 6 7 8] (repeat nil)))))))
3134
3135
+(deftest test-cljs-1590
3136
+ (is (= [""] (s/split "" #"\n")))
3137
+ (is (= [] (s/split "\n\n\n" #"\n")))
3138
+ (is (= [""] (s/split-lines "")))
3139
+ (is (= [] (s/split-lines "\n\n\n"))))
3140
+
3141
(comment
3142
;; ObjMap
3143
;; (let [ks (map (partial str "foo") (range 500))
0 commit comments