mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[GH-ISSUE #360] Leading or trailing hyphen in pre-release or build identifiers #4511
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chrisowensboston on GitHub (Mar 22, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/360
As written, the spec allows a pre-release or build identifier to begin or end with a hyphen.
As a result, the following pass the spec:
Is this intended / desired?
@FichteFoll commented on GitHub (Mar 23, 2017):
The following text is in both the pre-release and the build metadata sections:
So yes, this is valid. They compare lexicographically (over their ASCII value), by the way.
@jwdonahue commented on GitHub (Nov 28, 2017):
I would not expect to see any humans deciding to use version strings of that form, but I can imagine automation that might produce them, particularly if some config/database field is empty at the time it was generated. The hyphens may actually convey some meaning to somebody.
Since there is no bug or controversy here, please close this issue at your earliest possible convenience.
@chrisowensboston commented on GitHub (Nov 28, 2017):
Closed as requested by jsdonahue: there is no bug or controversy here.