From 1e70070d3d64638f8d66a161b096f92d48db7fa2 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 12 Jun 2019 23:18:40 -0400 Subject: [PATCH] Attempt the '-' on numbers --- src/parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse.rs b/src/parse.rs index 2291abdca1..8072c110b1 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -678,7 +678,7 @@ where I: Stream, )) ); - optional(char('-')) + optional(attempt(char('-'))) // Do this lookahead to decide if we should parse this as a number. // This matters because once we commit to parsing it as a number, // we may discover non-digit chars, indicating this is actually an @@ -755,7 +755,7 @@ where I: Stream, )) ); - optional(char('-')) + optional(attempt(char('-'))) // Do this lookahead to decide if we should parse this as a number. // This matters because once we commit to parsing it as a number, // we may discover non-digit chars, indicating this is actually an