Implement the new fields for bold, italic, underline, and strike-through.

This commit is contained in:
Tom Alexander
2023-12-08 15:51:38 -05:00
parent 3fb7cb82cd
commit 8fd9ff3848
4 changed files with 86 additions and 30 deletions

View File

@@ -81,14 +81,21 @@ pub(crate) fn maybe_consume_object_trailing_whitespace_if_not_exiting<'b, 'g, 'r
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Option<OrgSource<'s>>> {
// We have to check exit matcher after each character because description list tags need to end with a space unconsumed (" ::").
let (remaining, _) = many_till(
let (remaining, post_blank) = recognize(many_till(
one_of(" \t"),
alt((
peek(recognize(none_of(" \t"))),
parser_with_context!(exit_matcher_parser)(context),
)),
)(input)?;
Ok((remaining, None))
))(input)?;
Ok((
remaining,
if post_blank.len() == 0 {
None
} else {
Some(post_blank)
},
))
}
#[cfg_attr(