Move trailing whitespace parsing to a separate element.

I still need to parse the line break at the end of elements.
This commit is contained in:
Tom Alexander
2023-03-31 11:16:37 -04:00
parent 602cf4c374
commit 707eac5bf8
5 changed files with 42 additions and 5 deletions

View File

@@ -36,8 +36,6 @@ pub fn paragraph<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s st
|(children, _exit_contents)| !children.is_empty(),
)(input)?;
let (remaining, _trailing_whitespace) = trailing_whitespace(remaining)?;
let source = get_consumed(input, remaining);
Ok((remaining, Paragraph { source, children }))