Switch to using a type for bracket depth.
This is to make changing the type easier in the future.
This commit is contained in:
@@ -5,6 +5,7 @@ use nom::character::complete::space0;
|
||||
use nom::combinator::verify;
|
||||
use nom::multi::many_till;
|
||||
|
||||
use super::org_source::BracketDepth;
|
||||
use super::org_source::OrgSource;
|
||||
use super::parser_context::ContextElement;
|
||||
use super::Context;
|
||||
@@ -121,7 +122,7 @@ fn footnote_reference_only<'r, 's>(
|
||||
}
|
||||
|
||||
fn footnote_definition_end(
|
||||
starting_bracket_depth: i16,
|
||||
starting_bracket_depth: BracketDepth,
|
||||
) -> impl for<'r, 's> Fn(Context<'r, 's>, OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
move |context: Context, input: OrgSource<'_>| {
|
||||
_footnote_definition_end(context, input, starting_bracket_depth)
|
||||
@@ -132,7 +133,7 @@ fn footnote_definition_end(
|
||||
fn _footnote_definition_end<'r, 's>(
|
||||
_context: Context<'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
starting_bracket_depth: i16,
|
||||
starting_bracket_depth: BracketDepth,
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
let current_depth = input.get_bracket_depth() - starting_bracket_depth;
|
||||
if current_depth > 0 {
|
||||
|
||||
Reference in New Issue
Block a user