single-line-reformat: func [
"Reformats a block/object to a single line if it's short enough."
val [any-string!] /local s map
] [
either 80 >= length? s: trim/lines copy val [
map: ["{ " "{" "[ " "[" " }" "}" " ]" "]"]
foreach [from to] map [replace s from to]
] [val]
]
You need to create an account or log in to post comments to this site.