diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 3dbe82703..37c03cda0 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -103,12 +103,17 @@ impl Exec for NodeRaw { let line_spacing = ctx.state.par.line_spacing.resolve(em); let mut children = vec![]; + let mut newline = false; for line in &self.lines { + if newline { + children.push(layout::Node::Spacing(NodeSpacing { + amount: line_spacing, + softness: Softness::Soft, + })); + } + children.push(layout::Node::Text(ctx.make_text_node(line.clone()))); - children.push(layout::Node::Spacing(NodeSpacing { - amount: line_spacing, - softness: Softness::Hard, - })); + newline = true; } if self.block { diff --git a/tests/ref/markup/raw.png b/tests/ref/markup/raw.png index 6d90c9605..198f93782 100644 Binary files a/tests/ref/markup/raw.png and b/tests/ref/markup/raw.png differ