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
Thanks for bringing this up. Could you be a bit more specific, though? Where do you suggest to use heredoc? What kind of action would you expect from this issue? Thanks!
To add some context, this discussion came up on Discord, with the gist of it being when using a multiline string in a nested namespace like:
moduleMyAppINTRO=" foo bar"end
That the extra whitespace before foo and bar is unexpected, and you have to do like:
moduleMyAppINTRO="foobar"end
to remove them, which forces you to ignore the indentation of the constant.
The thinking behind this issue is to add something to https://crystal-lang.org/reference/1.3/syntax_and_semantics/literals/string.html#multiline-strings to suggest you most likely want to use a heredoc, as afaik, a heredoc can do everything a multiline string can do, but in a more idiomatic way. Or in other words, essentially deprecate multiline strings in favor of heredocs within the documentation.
Suggest
heredocs
as main way to wrap multiple lines of strings due its ability to remove leading whitespaces.The text was updated successfully, but these errors were encountered: