Identified the problem.

The issue is plain text is eating the line break so paragraph is failing since it expects a line break at the end.
This commit is contained in:
Tom Alexander
2023-03-27 18:08:17 -04:00
parent e1fbe36297
commit 028946ec90
8 changed files with 31 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ use super::util::get_consumed;
use super::util::trailing_whitespace;
use super::Context;
#[tracing::instrument(ret, level = "debug")]
pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Paragraph<'s>> {
let parser_context =
context.with_additional_node(ContextElement::ExitMatcherNode(ExitMatcherNode {
@@ -35,6 +36,7 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s st
Ok((remaining, Paragraph { source, children }))
}
#[tracing::instrument(ret, level = "debug")]
fn paragraph_end<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
let non_paragraph_element_matcher = parser_with_context!(non_paragraph_element)(context);
alt((