Unify two places checking if text was preceded by whitespace.

This commit is contained in:
Tom Alexander
2023-09-07 02:27:55 -04:00
parent 6b82b46e09
commit ba291c6776
3 changed files with 24 additions and 35 deletions

View File

@@ -325,7 +325,7 @@ fn _text_markup_end<'b, 'g, 'r, 's, 'c>(
input: OrgSource<'s>,
marker_symbol: &'c str,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
not(preceded_by_whitespace)(input)?;
not(preceded_by_whitespace(false))(input)?;
let (remaining, _marker) = terminated(
tag(marker_symbol),
peek(parser_with_context!(post)(context)),