Browse Source

allow - and + in version

Josh Yan 9 months ago
parent
commit
b0a947cf1f
1 changed files with 1 additions and 1 deletions
  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