diff --git a/src/to_html.rs b/src/to_html.rs index 6c0a74e..dbb560d 100644 --- a/src/to_html.rs +++ b/src/to_html.rs @@ -743,6 +743,7 @@ fn on_exit_break(context: &mut CompileContext) { /// Handle [`Exit`][Kind::Exit]:[`BlankLineEnding`][Name::BlankLineEnding]. fn on_exit_blank_line_ending(context: &mut CompileContext) { + context.slurp_one_line_ending = false; if context.index == context.events.len() - 1 { context.line_ending_if_needed(); } diff --git a/tests/frontmatter.rs b/tests/frontmatter.rs index a1077f8..5d3b8f5 100644 --- a/tests/frontmatter.rs +++ b/tests/frontmatter.rs @@ -91,6 +91,12 @@ fn frontmatter() -> Result<(), message::Message> { "should support spaces and tabs after closing fence" ); + assert_eq!( + to_html_with_options("---\n---\na\nb", &frontmatter)?, + "

a\nb

", + "should support line endings after frontmatter" + ); + assert_eq!( to_html_with_options("--- a\n---", &frontmatter)?, "

--- a

",