Explorar o código

allow - and + in version

Josh Yan hai 9 meses
pai
achega
b0a947cf1f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      parser/parser.go

+ 1 - 1
parser/parser.go

@@ -275,7 +275,7 @@ func parseRuneForState(r rune, cs state) (state, rune, error) {
 		switch {
 		case isNewline(r), isSpace(r):
 			return stateNil, 0, nil
-		case isAlpha(r), isNumber(r), r == '.':
+		case isAlpha(r), isNumber(r), r == '.', r == '+', r == '-':
 			return stateVersion, r, nil
 		default:
 			return stateNil, r, nil