-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require the beginning tag of multiline string to be followed by newline #5950
Comments
Related to #5794. I'm personally not fond of requiring a newline in all situations for multiline strings, as it feels too much like magic and is not consistent with how other languages' multiline strings behave. |
Pretty sure you can trim the contents of the variable before you use it, to remove any excessive formatting that it may contain, both whitespaces and newlines. |
This specific proposal cannot, but the solution to the issue you're experiencing definitely can. You know, you may only require |
Untrue, I require whitespace at the beginning sometimes. |
Not a fan since, magic. Also, in projects where this becomes an issue. I fully believe that exporting or otherwise abstracting how you handle large amounts of multi line text, is a requirement. Be it by exporting, resources, translation strings, etc. |
Describe the project you are working on
I am writing dialogues for my game into variables stored on a resource.
(Not using Exports.)
Describe the problem or limitation you are having in your project
The syntax expects the body of the text to immediately follow the three quotation marks like this:
This makes the first line harder to read and if the user wants to have all text easily readable they are left with whitespace at the beginning. This in my opinion kind of defeats the purpose of the multiline strings.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The syntax should require the newline or at least ignore the first newline in the final string.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The syntax now requires a newline after the 3 quotation marks.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No this can't be worked around with a script.
Is there a reason why this should be core and not an add-on in the asset library?
This seems like it cannot be done with an add-on.
The text was updated successfully, but these errors were encountered: