Fork me on GitHub
#cursive
<
2019-01-07
>
mss15:01:54

hey all, seeing a weird bug in a figwheel repl running in cursive. trying to eval (clojure.string/escape "hello guv'nuh" {\' "\'"}) and getting an error like: clojure.lang.ExceptionInfo: <NO_SOURCE_FILE> [line 1, col 6] Unsupported escape character: \'. {:type :reader-exception, :ex-kind :reader-error, :file "<NO_SOURCE_FILE>", :line 1, :col 6}

mss15:01:25

can’t say whether that’s a figwheel issue or a cursive issue but per someone who was helping out in the beginners chat, he got that statement to eval just fine in cider/emacs

mss15:01:34

any ideas how to further pinpoint my issue?

manutter5115:01:55

I think you want this: (clojure.string/escape "hello guv'nuh" {\' "\\'"}) maybe?

mss15:01:09

that evals to "hello guv\\'nuh"

mss15:01:13

which works totally fine?

manutter5115:01:38

:thinking_face:

mss15:01:40

but looking for a single slash as the string is read further down and that quote needs to be escaped

manutter5115:01:05

Yeah, let me check something, spinning up a figwheel repl now

mss15:01:09

actually wait you might be right

mss15:01:30

yep you are most definitely right

mss15:01:40

really appreciate the help, glad it wasn’t a deeper issue

royalaid18:01:59

@cfleming Hey, wondering if there is a way to make the static checking happy about things like (.preventDefault e)

royalaid18:01:35

I can wrap it but that is annoying and getting false flags about errors that are really errors makes it hard to trust what cursive is saying

cfleming22:01:33

@royalaid Is that JS interop?

cfleming22:01:06

Yeah, that just doesn’t work well. I’ve been meaning to dial that warning down forever, sorry - I’ll try to do that for the next release.

royalaid22:01:36

see also (js/document.execCommand "copy")