diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-06-03 21:39:08 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-06-03 21:39:42 +0200 |
commit | d7d18d3ec671872e5063117709339056982d9da3 (patch) | |
tree | 6c02c727a85cd69e955d9f89a7af929b44349431 | |
parent | 7da4ad54ebbb529c9b43ed545f0f1de8341bca50 (diff) | |
download | askama-d7d18d3ec671872e5063117709339056982d9da3.tar.gz askama-d7d18d3ec671872e5063117709339056982d9da3.tar.bz2 askama-d7d18d3ec671872e5063117709339056982d9da3.zip |
Strip 0 or more instead of 1 whitespace character (fixes #337)
-rw-r--r-- | askama_shared/src/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/askama_shared/src/parser.rs b/askama_shared/src/parser.rs index 10c4ce8..ec4db11 100644 --- a/askama_shared/src/parser.rs +++ b/askama_shared/src/parser.rs @@ -113,11 +113,11 @@ where E: ParseError<I>, { move |i: I| { - let i = alt::<_, _, (), _>((tag(b" "), tag(b"\t")))(i.clone()) + let i = many0(alt::<_, _, (), _>((tag(b" "), tag(b"\t"))))(i.clone()) .map(|(i, _)| i) .unwrap_or(i); let (i, res) = inner(i)?; - let i = alt::<_, _, (), _>((tag(b" "), tag(b"\t")))(i.clone()) + let i = many0(alt::<_, _, (), _>((tag(b" "), tag(b"\t"))))(i.clone()) .map(|(i, _)| i) .unwrap_or(i); Ok((i, res)) |