calva icon indicating copy to clipboard operation
calva copied to clipboard

Keywords with spaces breaks inspector and inline results

Open bullfest opened this issue 11 months ago • 1 comments

There seem to be some issue with how keywords with spaces are handled as results.

The following snippet is a map with two entries

{(keyword "Hey there") 5
 (keyword "1 2")       12}

But in the inspector/inline result it's displayed as 3 entries. Image

Image

bullfest avatar Mar 17 '25 10:03 bullfest

Oh, wow, I didn't even know that keywords with spaces was a thing, but of course they are.

It should be noted that keywords are basically treated as symbols by the reader and space isn't an allowed character. It's probably not wise to rely on keywords with spaces working. The Clojure team reserves all non-supported characters for future use, iirc.

That said, people use all kinds of non-supported characters in symbols and keywords, so we should have a look at this anyway.

PEZ avatar Mar 17 '25 11:03 PEZ