Fix nested bolds child eating the parent exit.
This commit is contained in:
@@ -131,6 +131,12 @@ fn _text_markup_object<'r, 's, 'x>(
|
||||
|(children, _exit_contents)| !children.is_empty(),
|
||||
)(remaining)?;
|
||||
|
||||
if exit_matcher_parser(context, remaining).is_ok() {
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Parent exit matcher is triggering.",
|
||||
))));
|
||||
}
|
||||
|
||||
// TODO: Sometimes its plain text, not objects
|
||||
let (remaining, _close) = text_markup_end_specialized(context, remaining)?;
|
||||
let (remaining, _trailing_whitespace) = space0(remaining)?;
|
||||
@@ -168,6 +174,12 @@ fn _text_markup_string<'r, 's, 'x>(
|
||||
|(children, _exit_contents)| !children.is_empty(),
|
||||
))(remaining)?;
|
||||
|
||||
if exit_matcher_parser(context, remaining).is_ok() {
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Parent exit matcher is triggering.",
|
||||
))));
|
||||
}
|
||||
|
||||
// TODO: Sometimes its plain text, not objects
|
||||
let (remaining, _close) = text_markup_end_specialized(context, remaining)?;
|
||||
let (remaining, _trailing_whitespace) = space0(remaining)?;
|
||||
|
||||
Reference in New Issue
Block a user