This commit is contained in:
Tom Alexander 2023-09-07 01:23:15 -04:00
parent 827f3e1c98
commit facbe716e9
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -179,7 +179,8 @@ fn _text_markup_object<'b, 'g, 'r, 's, 'c>(
) -> Res<OrgSource<'s>, Vec<Object<'s>>> {
let (remaining, _) = pre(context, input)?;
let (remaining, open) = tag(marker_symbol)(remaining)?;
let (remaining, _peek_not_whitespace) = peek(not(multispace1))(remaining)?;
let (remaining, _peek_not_whitespace) =
peek(verify(anychar, |c| !c.is_whitespace() && *c != '\u{200B}'))(remaining)?;
let text_markup_end_specialized = text_markup_end(open.into());
let parser_context = ContextElement::ExitMatcherNode(ExitMatcherNode {
class: ExitClass::Gamma,
@ -277,7 +278,6 @@ pub fn pre<'b, 'g, 'r, 's>(
None | Some('\r') | Some('\n') | Some(' ') | Some('\t') | Some('-') | Some('(')
| Some('{') | Some('\'') | Some('"') | Some('<') => {}
Some(_) => {
// Not at start of line, cannot be a heading
return Err(nom::Err::Error(CustomError::MyError(MyError(
"Not a valid pre character for text markup.".into(),
))));