summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-12 20:31:13 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-12 20:31:13 +0100
commitb6ee82c7e85ecaa1da420b69706dd2560aafc82f (patch)
tree5c918a00984f248a9faf9721f941415dc2843986 /library
parent78072c99eb82c06a49707f86fe7ff831ee891164 (diff)
Remove block around outline
Diffstat (limited to 'library')
-rw-r--r--library/src/meta/outline.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/src/meta/outline.rs b/library/src/meta/outline.rs
index 01aa7ee9..388021bb 100644
--- a/library/src/meta/outline.rs
+++ b/library/src/meta/outline.rs
@@ -1,5 +1,5 @@
use super::HeadingNode;
-use crate::layout::{BlockNode, HNode, HideNode, RepeatNode, Spacing};
+use crate::layout::{HNode, HideNode, ParbreakNode, RepeatNode, Spacing};
use crate::prelude::*;
use crate::text::{LinebreakNode, SpaceNode, TextNode};
@@ -108,7 +108,7 @@ impl Show for OutlineNode {
_: &Content,
styles: StyleChain,
) -> SourceResult<Content> {
- let mut seq = vec![];
+ let mut seq = vec![ParbreakNode.pack()];
if let Some(title) = styles.get(Self::TITLE) {
let body = title.clone().unwrap_or_else(|| {
TextNode::packed(match styles.get(TextNode::LANG) {
@@ -195,6 +195,8 @@ impl Show for OutlineNode {
ancestors.push(node);
}
- Ok(BlockNode(Content::sequence(seq)).pack())
+ seq.push(ParbreakNode.pack());
+
+ Ok(Content::sequence(seq))
}
}