Open travis opened 10 years ago
Isn't that the behavior of cljs.reader/read-string
though? Accepting only one form is reasonable. If someone needed to input more than one form I would assume they're working with a data structure which should be fine. Can you share your thoughts on where being able to have more than one form is useful?
oh - definitely don't think more than one form is useful, this is more of a user experience question - @sgrove's original comments were:
Right now it looks like the reader only take the first token in the text box, e.g. edit #{"a" "b" "c"} edit => 1 #{"a" "b" "c"} confirm => 1. There's no way to undo by default either, so perhaps it's better to catch it as another error?
this is really a user experience issue - ideally we'd either prevent users from entering multiple forms or raise an error when they do. I'm not really sure what the best solution to this is, just feels worth noting in an issue in case anyone has some time to explore.
Right now the editor ignores everything but the first form in an editing box when it saves, which is probably surprising. This should maybe raise an error? Alternatively we could implement undo functionality so that the user can recover from this surprise. Also open to other ideas