Do not consume trailing whitespace if the parent exit matcher is matching.
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::parser::parser_context::ContextElement;
|
||||
use crate::parser::parser_context::ExitMatcherNode;
|
||||
use crate::parser::parser_with_context::parser_with_context;
|
||||
use crate::parser::util::exit_matcher_parser;
|
||||
use crate::parser::util::maybe_consume_trailing_whitespace;
|
||||
use crate::parser::util::maybe_consume_trailing_whitespace_if_not_exiting;
|
||||
use crate::parser::util::start_of_line;
|
||||
|
||||
use super::element::non_paragraph_element;
|
||||
@@ -38,7 +38,8 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s st
|
||||
|
||||
// Not checking parent exit matcher because if there are any children matched then we have a valid paragraph.
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user