Commit 7f4f9ec7 authored by Scott Abbey's avatar Scott Abbey

Fix zero checking

parent 464b5639
......@@ -91,7 +91,10 @@ fn parse_meta(pre: &str) -> Vec<Identifier> {
pre.split(".")
.map(|part| {
if regex.is_match(part) {
// another wrinkle: we made sure that any number starts with a non-zero. But there's a
// problem: an actual zero is a number, yet gets left out by this heuristic. So let's
// also check for the single, lone zero.
if regex.is_match(part) || part == "0" {
// we can unwrap here because we know it is only digits due to the regex
Identifier::Numeric(part.parse().unwrap())
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment