Skip to content

Commit

Permalink
Merge pull request #1 from stevengj/occursin
Browse files Browse the repository at this point in the history
silence 0.7 deprecation
  • Loading branch information
stevengj authored Jun 8, 2018
2 parents 5fc368c + dc981a0 commit d66a7eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.6
Compat 0.53.0
Compat 0.62.0
4 changes: 2 additions & 2 deletions src/VersionParsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function vparse(s_::String)
s = replace(s_, r"^[^\d]*[^.\d](\.?\d)"=>s"\1") # strip non-numeric prefix
s = replace(s, ','=>".") # treat , as . (e.g MS resource-file syntax)
isempty(s) && throw(ArgumentError("non-numeric version string $s_"))
contains(s, r"^\.\d") && (s = "0" * s) # treat .x as 0.x
if contains(s, r"^\d:\d+") # debian-style version number
occursin(r"^\.\d", s) && (s = "0" * s) # treat .x as 0.x
if occursin(r"^\d:\d+", s) # debian-style version number
s = replace(s, r"^\d:"=>"") # strip epoch
end
i = Compat.findfirst(isspace, s)
Expand Down

0 comments on commit d66a7eb

Please sign in to comment.