Fix some errors.

This commit is contained in:
Tom Alexander 2023-04-22 01:13:05 -04:00
parent ba74bb58bb
commit 7855020927
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 5 additions and 7 deletions

View File

@ -21,13 +21,10 @@ use super::util::get_consumed;
use super::util::maybe_consume_trailing_whitespace_if_not_exiting;
use super::Context;
use crate::error::CustomError;
use crate::error::MyError;
use crate::error::Res;
use crate::parser::parser_with_context::parser_with_context;
use crate::parser::table::org_mode_table;
use nom::branch::alt;
use nom::combinator::cond;
use nom::combinator::map;
use nom::combinator::verify;
use nom::multi::many0;

View File

@ -162,6 +162,7 @@ pub fn plain_list_item<'r, 's>(
}));
let element_matcher = element(true);
let element_matcher = &element_matcher;
let with_consume_matcher = parser_with_context!(element_matcher)(&with_consume_context);
let without_consume_matcher = parser_with_context!(element_matcher)(&without_consume_context);
let exit_matcher = parser_with_context!(exit_matcher_parser)(&with_consume_context);
@ -185,12 +186,12 @@ pub fn plain_list_item<'r, 's>(
Err(_) => {
let (remaining, _ws) = space1(remaining)?;
let (remaining, (mut contents, final_element)) = many_till(
with_consume_matcher,
&with_consume_matcher,
alt((
terminated(without_consume_matcher, exit_matcher),
terminated(&without_consume_matcher, exit_matcher),
preceded(
peek(tuple((with_consume_matcher, exit_matcher))),
without_consume_matcher,
peek(tuple((&with_consume_matcher, exit_matcher))),
&without_consume_matcher,
),
)),
)(remaining)?;