google / google-java-format

Reformats Java source code to comply with Google Java Style.
Other
5.49k stars 848 forks source link

Update text block formatting after nickreid's improvements in unknown commit #1092

Closed copybara-service[bot] closed 3 months ago

copybara-service[bot] commented 3 months ago

Update text block formatting after nickreid's improvements in unknown commit

Previously the formatting was adding a forced break at the beginning of text blocks, which caused issues like #1081. With the changes in the baseline CL it correctly handles the 'width' of text blocks containing newlines as infinity, instead of counting the number of characters and treating the newline as having width 1.

Fixes https://github.com/google/google-java-format/issues/1081