diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-21 11:43:08 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-21 11:43:08 +0100 |
| commit | 4d42c79b169063f6c8e7603db6777d0e60ff2e0b (patch) | |
| tree | f432ddf579787778357f1c93a8c3aa501e924016 /src/exec | |
| parent | 4ff59baf5e8268d607643aeec23d113cd40324c7 (diff) | |
Fix spacing after raw blocks ⬇️
Diffstat (limited to 'src/exec')
| -rw-r--r-- | src/exec/mod.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 3dbe8270..37c03cda 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 { |
