mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Fix spacing after raw blocks ⬇️
This commit is contained in:
parent
4ff59baf5e
commit
4d42c79b16
@ -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 {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.1 KiB |
Loading…
x
Reference in New Issue
Block a user