-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only consider comments inside a span if they are fully inside the spa…
…n; previously they were considered "in the span" if their line number was in the span. This was causing issues when formatting short blocks with comments, especially in tuples: `if bar > u32:0 { u1:1} else {1:0} // this comment will be repeated` which was erroneously formatted to: ``` if bar > u32:0 { u1:1 // this comment will be repeated } else { u1:0 // this comment will be repeated } // this comment will be repeated ``` Fixes #1678 PiperOrigin-RevId: 713388090
- Loading branch information
1 parent
085321c
commit 88debc8
Showing
3 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters