Counter set always allows alphabetic values regardless of org-list-allow-alphabetical.

This commit is contained in:
Tom Alexander 2023-09-29 14:32:41 -04:00
parent 6670f8c768
commit 3a422e6435
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -166,12 +166,8 @@ fn plain_list_item<'b, 'g, 'r, 's>(
|(_bullet_type, bull)| Into::<&str>::into(bull) != "*" || indent_level > 0, |(_bullet_type, bull)| Into::<&str>::into(bull) != "*" || indent_level > 0,
)(remaining)?; )(remaining)?;
let (remaining, _maybe_counter_set) = opt(tuple(( let (remaining, _maybe_counter_set) =
space1, opt(tuple((space1, tag("[@"), counter_set_value, tag("]"))))(remaining)?;
tag("[@"),
parser_with_context!(counter)(context),
tag("]"),
)))(remaining)?;
let (remaining, maybe_checkbox) = opt(tuple((space1, item_checkbox)))(remaining)?; let (remaining, maybe_checkbox) = opt(tuple((space1, item_checkbox)))(remaining)?;
@ -314,6 +310,16 @@ fn counter<'b, 'g, 'r, 's>(
} }
} }
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn counter_set_value<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
alt((
recognize(one_of(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
)),
digit1,
))(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))] #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn plain_list_end<'b, 'g, 'r, 's>( fn plain_list_end<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>, _context: RefContext<'b, 'g, 'r, 's>,