diff --git a/src/comments.rs b/src/comments.rs index fb7d5cb..c972a82 100644 --- a/src/comments.rs +++ b/src/comments.rs @@ -2,7 +2,7 @@ use winnow::{ ascii::{multispace0, multispace1}, combinator::{alt, eof, opt}, error::ParserError, - token::take_till0, + token::take_till, PResult, Parser, }; @@ -22,7 +22,7 @@ pub fn space_or_comment1<'a, E: ParserError<&'a str>>(input: &mut &'a str) -> PR fn comment<'a, E: ParserError<&'a str>>(input: &mut &'a str) -> PResult<&'a str, E> { multispace0.parse_next(input)?; '%'.parse_next(input)?; - let string = take_till0(|c| c == '\n').parse_next(input)?; + let string = take_till(0.., |c| c == '\n').parse_next(input)?; multispace0.parse_next(input)?; opt(comment).parse_next(input)?; Ok(string) diff --git a/src/expressions.rs b/src/expressions.rs index 836cd8c..a1669d1 100644 --- a/src/expressions.rs +++ b/src/expressions.rs @@ -2,7 +2,7 @@ use winnow::{ ascii::multispace1, combinator::{alt, delimited, fold_repeat, opt, preceded, repeat, separated}, error::{FromExternalError, ParserError}, - token::{take_till1, take_while}, + token::{take_till, take_while}, PResult, Parser, }; @@ -200,7 +200,7 @@ fn parse_escaped_whitespace<'a, E: ParserError<&'a str>>( fn parse_literal<'a, E: ParserError<&'a str>>( input: &mut &'a str, ) -> PResult, E> { - let c = take_till1(['\"', '\\']).parse_next(input)?; + let c = take_till(1.., ['\"', '\\']).parse_next(input)?; Ok(StringFragment::Literal(c)) }