Add a comment with a note about what my next step is.

This commit is contained in:
Tom Alexander 2022-12-11 02:31:14 -05:00
parent 50a57ef15b
commit 23e567ca93
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 1 additions and 1 deletions

View File

@ -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)),