-
Notifications
You must be signed in to change notification settings - Fork 80
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
Special-case trimIndent
?
#389
Comments
There's two ways to getting this I can see:
Leaving this open to see if others have thoughts, but I think this is unlikely to work. |
And I do think that's the right way. The case to make here would be that this function is just about as close to a language feature as a thing could be. Like, it's more that it is a special case than that the tool is making it so. Again... "Eh?" (I mentioned in another issue that I still sometimes guiltily counteract what the formatter does in my code, so I feel some certain responsibility to file those things for consideration, but don't feel too invested in what happens to them after that.) |
This is a duplicate of #251 I believe. |
I don't believe it is; that one seems to be about reindenting the actual string contents using the signal of |
Ya, your right, sorry I misread. |
This here is what Google Java Format does
Since we inherit from GJF, maybe we should request for the capability to handle exceptions for text blocks in there. Could you open an issue in that repo (https://github.com/google/google-java-format) or link an existing one to this issue? |
I would add |
This might be an easy close, not sure.
But following an ending
"""
with.trimIndent()
is arguably an inherent part of the language idiom for many many use cases, and I wondered if those could feasibly be kept together on the same line, as a special carve-out.Current
Seems nicer
Eh?
The text was updated successfully, but these errors were encountered: