Skip to content

Conversation

TTOzzi
Copy link
Member

@TTOzzi TTOzzi commented Sep 12, 2025

Resolve #1056

In addition to the example shown in the issue, various other cases of missing comments were also addressed. I made sure to preserve the original position of comments as much as possible.

Comment on lines -100 to -101
extension Trivia {
func trimmingSuperfluousNewlines(fromClosingBrace: Bool) -> (Trivia, Int) {
Copy link
Member Author

@TTOzzi TTOzzi Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved because it is now used commonly in other places.
(There are no changes to the logic.)

return 4
return 4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the test cases, some whitespace may appear incorrect, but in actual usage the PrettyPrinter will handle the spacing properly.

@TTOzzi TTOzzi force-pushed the single-line-getter branch 5 times, most recently from c8db80e to d35ee18 Compare September 13, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comment in front of get { is dropped
1 participant