Open jpluscplusm opened 1 month ago
The spec's language makes this clear:
The whitespace before a closing triple quote must appear before any non-empty line after the opening quote and will be removed from each of these lines in the string literal.
What page were you looking at?
https://cuelang.org/docs/tour/types/stringlit/
What version of the site were you looking at?
https://github.com/cue-lang/cuelang.org/commit/fccf4804ae4fabee1fa1f566cd2cca37daa80ab0
What did you do?
I tried to rely on this phrase when writing a multi-line string that contains blank lines:
What did you expect?
I expected that blank lines inside a multi-line string would require the string's standard whitespace prefix.
What did you see instead?
The prefix is not required when the intent is to encode a blank line:
(This example doesn't make it clear via the web view, but the copy button does generate the correct underlying txtar that demonstrates the corner case)