Add a comment with a note about what my next step is.
This commit is contained in:
parent
50a57ef15b
commit
23e567ca93
@ -129,7 +129,6 @@ fn can_start_bold<'s, 'r>(context: Context<'r, 's>) -> bool {
|
|||||||
match ctx.get_data() {
|
match ctx.get_data() {
|
||||||
ContextElement::FailMatcherNode(_) => {},
|
ContextElement::FailMatcherNode(_) => {},
|
||||||
ContextElement::PreviousElementNode(previous_element_node) => {
|
ContextElement::PreviousElementNode(previous_element_node) => {
|
||||||
// TODO okay if previous element is a space but not if its text
|
|
||||||
match &previous_element_node.element {
|
match &previous_element_node.element {
|
||||||
Token::TextElement(text_element) => {
|
Token::TextElement(text_element) => {
|
||||||
match 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>> {
|
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);
|
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 =
|
let nom_context =
|
||||||
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
|
context.with_additional_node(ContextElement::FailMatcherNode(FailMatcherNode {
|
||||||
fail_matcher: ChainBehavior::AndParent(Some(&recognize_bold_end)),
|
fail_matcher: ChainBehavior::AndParent(Some(&recognize_bold_end)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user