How can I parse a string of Hiccup into a Hiccup node?
For example,
"[:b 'hello world']"
into [:b "hello world"]
How can I parse a string of Hiccup into a Hiccup node?
For example,
"[:b 'hello world']"
into [:b "hello world"]
Use reader to convert string to data structures:
user=> (clojure.edn/read-string "[:b 'hello world']")
[:b 'hello world']
You should use "
to denote string:
user=> (clojure.edn/read-string "[:b \"hello world\"]")
[:b "hello world"]
© 2022 - 2024 — McMap. All rights reserved.
[cljs.reader]
– Karonkaross