This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-30
Channels
- # babashka (19)
- # beginners (87)
- # calva (11)
- # cider (6)
- # cljdoc (30)
- # clojure (84)
- # clojure-china (1)
- # clojure-dev (13)
- # clojure-europe (4)
- # clojure-france (1)
- # clojure-gamedev (1)
- # clojurescript (12)
- # core-async (1)
- # cursive (12)
- # data-oriented-programming (1)
- # defnpodcast (1)
- # emacs (9)
- # events (1)
- # fulcro (8)
- # graalvm (1)
- # introduce-yourself (1)
- # missionary (6)
- # music (1)
- # nextjournal (14)
- # off-topic (26)
- # portal (2)
- # re-frame (1)
- # releases (2)
- # shadow-cljs (13)
How can I make clerk render a "multiline string" , like "a\nb" in multiple lines ?
currently only by providing your own string viewer to override the default one https://github.com/nextjournal/clerk/blob/main/src/nextjournal/clerk/viewer.cljc#L171
clerk/code did it for my case as well.
ah yeah, https://github.com/nextjournal/clerk/blob/main/notebooks/rule_30.clj#L6 is an example of an override
was thinking of making the string viewer expandable by making the quotes clickable and rendering new lines when expanded
"my concrete" case is perfectly rendered "as is". I want to see the full string. Use clerk/code is maybe a work around. In general, a way for "verbatim" full printing of strings (using newlines , if present) is useful. especial for interop with Java. Some java libraries rely on "toString" printing clerk/code could be just sthat method, it seems. (but as it does "magic", it might fail on some strings)
Not sure, if this needs clickable expansions, or just print the full string. Maybe both:slightly_smiling_face:
Can we have tables with horizontal scroll ? That would be a good extension of ":full"
I can get it with a "trick" already know.
(clerk/html
[:span
(clerk/table
..wide table
)
])
But maybe we should have a better solution
Can we control the overall width of the output ? It was asked here: https://github.com/nextjournal/clerk/issues/54 but the answer was for "per viewer", I look more fore a global setting.