Separate out the text markup types into their own types.

This commit is contained in:
Tom Alexander
2023-04-22 20:22:07 -04:00
parent 401fb339d0
commit d2fc8a513f
4 changed files with 131 additions and 13 deletions

View File

@@ -21,13 +21,12 @@ use crate::parser::parser_with_context::parser_with_context;
use crate::parser::util::exit_matcher_parser;
use crate::parser::util::get_consumed;
use crate::parser::util::get_one_before;
use crate::parser::TextMarkup;
#[tracing::instrument(ret, level = "debug")]
pub fn text_markup<'r, 's>(
context: Context<'r, 's>,
input: &'s str,
) -> Res<&'s str, TextMarkup<'s>> {
) -> Res<&'s str, TextMarkupObject<'s>> {
let (remaining, _) = pre(context, input)?;
let (remaining, open) = marker(remaining)?;
let text_markup_end_specialized = text_markup_end(open);
@@ -51,7 +50,7 @@ pub fn text_markup<'r, 's>(
let source = get_consumed(input, remaining);
Ok((remaining, TextMarkup { source, children }))
Ok((remaining, TextMarkupObject { source, children }))
}
#[tracing::instrument(ret, level = "debug")]