Apply Type To Tuple Parser In Rust's nom Crate
Code
tuple((
tag("```"),
not_line_ending,
line_ending,
take_until("```"),
tag("```"),
))
.map(
|(_, x, _, y, _): (&str, &str, &str, &str, &str)| Section::Code {
lang: Some(x.trim().to_string()),
text: y.trim().to_string(),
},
),