-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/doc: add // while wrapping a line comment in ToText
Currently, lineWrapper does not detect if it is printing a line comment or not. Hence, while wrapping a comment, the new line does not get prefixed with a //. We add logic to lineWrapper to detect this case and add // accordingly. Block comments do not need any such handling. Added tests for both cases. Fixes golang#20929 Change-Id: I656037c2d865f31dd853cf9195f43ab7c6e6fc53 Reviewed-on: https://go-review.googlesource.com/c/go/+/163578 Run-TryBot: Robert Griesemer <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 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