Quoted text within brackets spanning multiple lines
When one places quoted text within brackets that spans multiple lines, it might be useful to not format it into one long line, as shown below:
Black v22.3.0
Options
--line-length=88
--safe
Input
end = (
" </div>"
" </td>"
" </tr>"
"</table>"
)
Output
end = " </div>" " </td>" " </tr>" "</table>"
Expected
Hello, I'm new to open source contribution. I would love to work on this issue provided the necessary details are available.
Hi @Panther-12! Happy to see you'd like to contribute to Black! You should first take a look at https://black.readthedocs.io/en/latest/contributing/the_basics.html which provides an overview on contributing.
I know our contributing documentation is lacking (matter of fact I'm currently working on rewriting them to be way better), so please don't worry about asking too many questions. Feel free to chat with us in the #black-formatter channel on Python Discord
For what it's worth, I'd recommend not working on this issue as your first contribution. It's a fairly involved issue and it's lacking a lot of details that you'd have to work out yourself. I'd recommend working on https://github.com/psf/black/issues/3153 first as it's a lot more clear-cut and simple.
Basically you should fork the repository, clone your fork, edit https://github.com/psf/black/blob/main/docs/usage_and_configuration/black_as_a_server.md to include a warning about not running blackd as a publically accessible server. Actually, you could do all of this using the GitHub web editor instead, i.e. press .
To help you get started, you can copy and paste this snippet after the first paragraph, and then commit and push your changes. That's simple enough, hopefully :)
```{warning}
`blackd` should not be run as a publically accessible server as there are no security
precautions in place to prevent abuse. **It is intended for local use only**.
```
Finally, make a PR with your changes to that one document and we'll start the review process. I'll share more on that once we get to that point :)
Good luck!
Ok Thanks. Let me get started
Thank you for the suggestion, but I don't think we should refrain from joining strings in general. In fact, we specifically introduced "experimental string processing" for this, and I don't see a good way of determining when the join shouldn't happen. We aim to ignore previous formatting, and looking at the content seems like endlessly complex guesswork.
The string looks a lot better in --preview now: playground. You could also use string addition, which is not currently collapsed.
We'll reopen if there's something to discuss!