From 23e567ca93d8da2c0a5b2c39322c65123457eba8 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 11 Dec 2022 02:31:14 -0500 Subject: [PATCH] Add a comment with a note about what my next step is. --- src/parser/text_element_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/text_element_parser.rs b/src/parser/text_element_parser.rs index c4d7440d..64d91d03 100644 --- a/src/parser/text_element_parser.rs +++ b/src/parser/text_element_parser.rs @@ -129,7 +129,6 @@ fn can_start_bold<'s, 'r>(context: Context<'r, 's>) -> bool { match ctx.get_data() { ContextElement::FailMatcherNode(_) => {}, ContextElement::PreviousElementNode(previous_element_node) => { - // TODO okay if previous element is a space but not if its text match &previous_element_node.element { Token::TextElement(text_element) => { match text_element { @@ -229,6 +228,7 @@ fn recognize_bold_end(input: &str) -> Res<&str, &str> { fn flat_bold<'s, 'r>(context: Context<'r, 's>, i: &'s str) -> Res<&'s str, Bold<'s>> { let bold_start = parser_with_context!(context_bold_start)(&context); + // TODO: I need to make the fail matchers take in context so I can use context_bold_end. Otherwise this is ending bolds early just because it hits an asterisk. let nom_context = context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode { fail_matcher: ChainBehavior::AndParent(Some(&recognize_bold_end)),