Add affiliated keyword matching to the detect_* functions.
This commit is contained in:
@@ -39,8 +39,7 @@ pub(crate) fn org_mode_table<'b, 'g, 'r, 's>(
|
||||
context: RefContext<'b, 'g, 'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, Table<'s>> {
|
||||
let (input, affiliated_keywords) =
|
||||
many0(parser_with_context!(affiliated_keyword)(context))(input)?;
|
||||
let (input, affiliated_keywords) = many0(affiliated_keyword)(input)?;
|
||||
start_of_line(input)?;
|
||||
peek(tuple((space0, tag("|"))))(input)?;
|
||||
|
||||
@@ -80,6 +79,7 @@ pub(crate) fn org_mode_table<'b, 'g, 'r, 's>(
|
||||
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub(crate) fn detect_table<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ()> {
|
||||
let (input, _) = many0(affiliated_keyword)(input)?;
|
||||
tuple((start_of_line, space0, tag("|")))(input)?;
|
||||
Ok((input, ()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user