MMM: Coverage and naming fix

This commit is contained in:
Natty 2023-10-26 18:38:45 +02:00
parent 91883c6b36
commit c6a282c26e
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 7 additions and 2 deletions

View File

@ -477,11 +477,11 @@ fn spliced<'a>(
type NE<E> = nom::Err<E>;
type NomError<'x> = nom::error::Error<Span<'x>>;
let quote_span = Span::new_extra(
let spliced_span = Span::new_extra(
&combined,
segments.first().map_or(SpanMeta::new(0), |s| s.extra),
);
let (input, inner) = match func(quote_span) {
let (input, inner) = match func(spliced_span) {
Ok(s) => s,
Err(e) => {
return match e {
@ -1749,6 +1749,11 @@ mod test {
"bold italic".into()
)))))
);
assert_eq!(
parse_full("~~*hello\nworld*"),
Token::PlainText("~~*hello\nworld*".into())
)
}
#[test]