Skip to content

Commit

Permalink
match optional +/- prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dezyh committed Jan 2, 2024
1 parent 2ce3026 commit aede630
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ascii/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use crate::error::{ErrMode, ErrorKind, Needed};
use crate::stream::{AsBStr, AsChar, ParseSlice, Stream, StreamIsPartial};
use crate::stream::{Compare, CompareResult};
use crate::token::one_of;
use crate::token::tag_no_case;
use crate::token::take_till;
use crate::token::take_while;
use crate::trace::trace;
Expand Down Expand Up @@ -1366,9 +1367,9 @@ where
{
alt((
recognize_float,
crate::token::tag_no_case("nan"),
crate::token::tag_no_case("infinity"),
crate::token::tag_no_case("inf"),
tag_no_case("nan"),
(opt(one_of(['+', '-'])), tag_no_case("infinity")).recognize(),
(opt(one_of(['+', '-'])), tag_no_case("inf")).recognize(),
))
.parse_next(input)
}
Expand Down

0 comments on commit aede630

Please sign in to comment.