Convert all functions to using the wrapped input type.
This commit is contained in:
@@ -8,6 +8,7 @@ use nom::combinator::verify;
|
||||
use nom::multi::many1_count;
|
||||
use nom::sequence::tuple;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
use super::Context;
|
||||
use crate::error::Res;
|
||||
use crate::parser::util::start_of_line;
|
||||
@@ -16,8 +17,8 @@ use crate::parser::HorizontalRule;
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub fn horizontal_rule<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, HorizontalRule<'s>> {
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, HorizontalRule<'s>> {
|
||||
start_of_line(context, input)?;
|
||||
let (remaining, rule) = recognize(tuple((
|
||||
space0,
|
||||
@@ -25,5 +26,10 @@ pub fn horizontal_rule<'r, 's>(
|
||||
space0,
|
||||
alt((line_ending, eof)),
|
||||
)))(input)?;
|
||||
Ok((remaining, HorizontalRule { source: rule }))
|
||||
Ok((
|
||||
remaining,
|
||||
HorizontalRule {
|
||||
source: rule.into(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user