Upgrade cljs + shadow

- Upgraded shadow to keep goog compiler versions the same
- Converted some safe-parse-int's to parse-long
- Converted some safe-parse-float's to parse-double
- Simplified impl of safe-parse-* fns
This commit is contained in:
Gabriel Horner
2022-05-16 21:21:47 -04:00
committed by Tienson Qin
parent 29eb3dbca9
commit fec0b755a8
12 changed files with 26 additions and 58 deletions

View File

@@ -1,8 +1,7 @@
(ns frontend.util.list
(:require [frontend.util.thingatpt :as thingatpt]
[frontend.util.cursor :as cursor]
[clojure.string :as string]
[frontend.util :as util]))
[clojure.string :as string]))
(defn get-prev-item [& [input]]
(when-not (cursor/textarea-cursor-first-row? input)
@@ -56,7 +55,7 @@
(map (fn [line] (if (newline? line) "" line)))
(string/join "\n"))
(let [[_ num-str] (re-find #"^(\d+){1}\." line)
num (if num-str (util/safe-parse-int num-str) nil)
num (if num-str (parse-long num-str) nil)
double-newlines?' (or double-newlines?
(and (newline? line) (seq others) (newline? (first others))))
[idx' result'] (if (and (not double-newlines?') num)