Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::{canonicalization, hash, DKIMError};
use nom::bytes::complete::tag;
use nom::bytes::complete::take_while1;
use nom::character::complete::alpha1;
use nom::combinator::all_consuming;
use nom::combinator::opt;
use nom::multi::fold_many0;
use nom::sequence::delimited;
Expand All @@ -27,7 +28,7 @@ pub struct Tag {
pub fn tag_list(input: &str) -> IResult<&str, Vec<Tag>> {
let (input, start) = tag_spec(input)?;

terminated(
all_consuming(terminated(
fold_many0(
preceded(tag(";"), tag_spec),
move || vec![start.clone()],
Expand All @@ -37,7 +38,7 @@ pub fn tag_list(input: &str) -> IResult<&str, Vec<Tag>> {
},
),
opt(tag(";")),
)(input)
))(input)
}

/// tag-spec = [FWS] tag-name [FWS] "=" [FWS] tag-value [FWS]
Expand Down