Remove unnecessary context from some util functions.
All checks were successful
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded

This commit is contained in:
Tom Alexander
2023-08-24 19:29:00 -04:00
parent e5224cda63
commit cf37bc4111
20 changed files with 38 additions and 55 deletions

View File

@@ -36,7 +36,7 @@ pub fn org_mode_table<'r, 's>(
context: Context<'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Table<'s>> {
start_of_line(context, input)?;
start_of_line(input)?;
peek(tuple((space0, tag("|"))))(input)?;
let parser_context = context
@@ -70,7 +70,7 @@ fn table_end<'r, 's>(
context: Context<'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, OrgSource<'s>> {
start_of_line(context, input)?;
start_of_line(input)?;
recognize(tuple((space0, not(tag("|")))))(input)
}
@@ -90,7 +90,7 @@ pub fn org_mode_table_row_rule<'r, 's>(
context: Context<'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, TableRow<'s>> {
start_of_line(context, input)?;
start_of_line(input)?;
let (remaining, _) = tuple((space0, tag("|-"), is_not("\r\n"), line_ending))(input)?;
let source = get_consumed(input, remaining);
Ok((
@@ -107,7 +107,7 @@ pub fn org_mode_table_row_regular<'r, 's>(
context: Context<'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, TableRow<'s>> {
start_of_line(context, input)?;
start_of_line(input)?;
let (remaining, _) = tuple((space0, tag("|")))(input)?;
let (remaining, children) =
many1(parser_with_context!(org_mode_table_cell)(context))(remaining)?;