You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to rely on this phrase when writing a multi-line string that contains blank lines:
Any whitespace before the closing quotes must also prefix the lines between the quotes, because it is removed from all 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:
exec cue export foo.cue
cmp stdout out
-- foo.cue --
x: """
The next line is totally blank.
The next line is blank, but the CUE has a tab prefix
This is the last line.
"""
-- out --
{
"x": "The next line is totally blank.\n\nThe next line is blank, but the CUE has a tab prefix\n\nThis is the last 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)
The text was updated successfully, but these errors were encountered:
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?
cue-lang/cuelang.org@fccf480
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)
The text was updated successfully, but these errors were encountered: