Lifetime issue not general enough.

This commit is contained in:
Tom Alexander
2022-10-15 14:28:24 -04:00
parent 1d571acc17
commit 30042ddcfe
2 changed files with 17 additions and 0 deletions

View File

@@ -1,4 +1,7 @@
//! A single element of text.
use std::cell::RefCell;
use std::rc::Rc;
use crate::parser::parser_with_context::parser_with_context;
use crate::parser::text::paragraph_end;
@@ -34,6 +37,11 @@ fn flat_text_element<'s, 'r>(i: &'s str, context: &'r NomContext) -> Res<&'s str
))(i)
}
fn flat_bold<'s, 'r>(i: &'s str, context: &'r NomContext) -> Res<&'s str, TextElement<'s>> {
let new_context = context.without_bold(Rc::new(RefCell::new(recognize(bold_end))));
todo!()
}
pub fn paragraph<'s, 'r>(
i: &'s str,
context: &'r NomContext,