Do not consume trailing whitespace if the parent exit matcher is matching.
This commit is contained in:
@@ -4,7 +4,7 @@ use super::error::Res;
|
||||
use super::greater_element::PlainList;
|
||||
use super::greater_element::PlainListItem;
|
||||
use super::parser_with_context::parser_with_context;
|
||||
use super::util::maybe_consume_trailing_whitespace;
|
||||
use super::util::maybe_consume_trailing_whitespace_if_not_exiting;
|
||||
use super::util::non_whitespace_character;
|
||||
use super::Context;
|
||||
use crate::parser::element::element;
|
||||
@@ -51,7 +51,8 @@ pub fn plain_list<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s s
|
||||
};
|
||||
}
|
||||
|
||||
let (remaining, _trailing_ws) = maybe_consume_trailing_whitespace(context, remaining)?;
|
||||
let (remaining, _trailing_ws) =
|
||||
maybe_consume_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
|
||||
let source = get_consumed(input, remaining);
|
||||
Ok((remaining, PlainList { source, children }))
|
||||
|
||||
Reference in New Issue
Block a user