fix(format): preserve flag separators and normalise CRLF input
Assisted-by: GLM 5.3
This commit is contained in:
+2
-2
@@ -312,7 +312,7 @@ func spaceBetween(prev, cur token.Token) bool {
|
||||
return false
|
||||
case token.Comma:
|
||||
return false
|
||||
case token.Star, token.Plus, token.Minus, token.Slash:
|
||||
case token.Star, token.Plus, token.Minus, token.Slash, token.Pipe:
|
||||
return false
|
||||
case token.LShift, token.RShift, token.Arrow, token.At:
|
||||
return false
|
||||
@@ -328,7 +328,7 @@ func spaceBetween(prev, cur token.Token) bool {
|
||||
}
|
||||
}
|
||||
switch prev.Kind {
|
||||
case token.LParen, token.Star, token.Plus, token.Minus, token.Slash:
|
||||
case token.LParen, token.Star, token.Plus, token.Minus, token.Slash, token.Pipe:
|
||||
return false
|
||||
case token.Dollar:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user