Remove unnecessary context from some util functions.
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user