This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-06
Channels
- # aleph (43)
- # announcements (11)
- # babashka (35)
- # beginners (70)
- # calva (4)
- # cider (8)
- # clerk (15)
- # clojure (192)
- # clojure-dev (7)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-norway (65)
- # clojure-uk (4)
- # code-reviews (4)
- # conjure (1)
- # cursive (41)
- # data-science (1)
- # datomic (8)
- # emacs (7)
- # fulcro (13)
- # humbleui (17)
- # hyperfiddle (53)
- # kaocha (4)
- # malli (7)
- # missionary (17)
- # music (1)
- # obb (1)
- # off-topic (8)
- # polylith (1)
- # portal (3)
- # releases (11)
- # shadow-cljs (36)
- # squint (4)
- # tools-deps (4)
Clojure newb sent here from #C053AK3F9,
When I cider-eval-buffer
on the following code, the "/welcome"
response map causes the ensuing error:
core.clj
(defn app [req]
"/"
{:status 200 :body "Till forever" :headers {}}
"/welcome"
{:status 200 :body "<h1>Welcome</hl>
<ul>
<li><a href="/greeting">Greeting</a></li>
</ul>"
:headers {"Content-Type" "text/html; charset=UTF-8"}})
Error:
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
Syntax error reading source at (core.clj:16:50).
Invalid token: /greeting
Emacs 29
$ clojure -version
Clojure CLI version 1.11.1.1435
$ java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7)
OpenJDK 64-Bit Server VM (build 17.0.10+7, mixed mode)
that’s a different error message than your message in #C053AK3F9 but it appears to be greeting isn’t escaped
your quotation mark before greeting is correctly marked as “this is a quote in the string, not ending the string”. but the one after greeting is just ending the string rather than a quotation mark inside the string
"this is text \"and this is quoted\" inside the string"
note that "
is used to start and end the string. So if you want them to appear inside the string you need to escape them \"
@U11BV7MTK yep the cider-turn-on-company-mode
was some errant elisp that I cleared up from the config.