Commit 35199fc 1 parent fd040d1 commit 35199fc Copy full SHA for 35199fc
File tree 5 files changed +12
-2
lines changed
5 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Comment struct {
11
11
}
12
12
13
13
func (c * Comment ) Text () string {
14
- return strings .TrimSpace ( strings . TrimPrefix (c .Value , "#" ) )
14
+ return strings .TrimPrefix (c .Value , "#" )
15
15
}
16
16
17
17
type CommentGroup struct {
Original file line number Diff line number Diff line change @@ -726,5 +726,5 @@ func (f *formatter) FormatComment(comment *ast.Comment) {
726
726
if comment == nil {
727
727
return
728
728
}
729
- f .WriteString ("# " ).WriteString (comment .Text ()).WriteNewline ()
729
+ f .WriteString ("#" ).WriteString (comment .Text ()).WriteNewline ()
730
730
}
Original file line number Diff line number Diff line change
1
+ #no spaces at the head of comment
2
+ # one space at the head of comment
3
+ # two spaces at the head of comment
4
+ # one tab at the head of comment
5
+ # two tabs at the head of comment
Original file line number Diff line number Diff line change
1
+ #no spaces at the head of comment
2
+ # one space at the head of comment
3
+ # two spaces at the head of comment
4
+ # one tab at the head of comment
5
+ # two tabs at the head of comment
You can’t perform that action at this time.
0 commit comments