Closed andreystepanov closed 8 months ago
This is actually a pretty printer bug. These are entered with the multiline string syntax and likely still looks like that locally, but sometimes aren't printed with the multiline syntax. See Cody's comment here: https://github.com/unisonweb/unison/issues/4392#issuecomment-1813248580
I'd rather we fix that original bug if we can, even though this is simple to fix in the frontend (I think its best to not diverge on rendering capabilities between the 2 interfaces). Definitely should re-evaluate that if we can get to the pretty printing issue in a timely manner.
cc @ChrisPenner
Oh, i haven't seen that issue/comment, sorry.
Agree, systemic fix would be much better than "hacky" solution i've proposed :)
Feel free to close this one then.
I think #73 fixes can be improved upon.
Since Unison supports multiline string literals, why don't we just convert string literals that:
\n
) also can be constrained, like if there's more that 3 line-breaks presentAnd the nice thing about it (from quick look), is that i can all be solved on the client-side, without any changes on the back-end.
Let me know what you think, @hojberg
Example of potential check
in vanilla javascript
Real World Examples
Both versions of Unison code are totally valid from the compiler point of view, so
Copy
andPaste
won't be an issueTaken from https://github.com/unisonweb/ui-core/issues/73#issuecomment-1813245259
Taken from @rlmark/cloudDoodles/code/releases/1.0.0/latest/terms/assets/indexHtml