Only consume trailing whitespace when not exiting for all objects.
This commit is contained in:
@@ -17,6 +17,7 @@ use tracing::span;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
use super::radio_link::RematchObject;
|
||||
use super::util::maybe_consume_object_trailing_whitespace_if_not_exiting;
|
||||
use super::Context;
|
||||
use crate::error::CustomError;
|
||||
use crate::error::MyError;
|
||||
@@ -204,7 +205,8 @@ fn _text_markup_object<'r, 's, 'x>(
|
||||
}
|
||||
|
||||
let (remaining, _close) = text_markup_end_specialized(context, remaining)?;
|
||||
let (remaining, _trailing_whitespace) = space0(remaining)?;
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
Ok((remaining, children))
|
||||
}
|
||||
|
||||
@@ -254,7 +256,8 @@ fn _text_markup_string<'r, 's, 'x>(
|
||||
}
|
||||
|
||||
let (remaining, _close) = text_markup_end_specialized(context, remaining)?;
|
||||
let (remaining, _trailing_whitespace) = space0(remaining)?;
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
Ok((remaining, contents))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user