summaryrefslogtreecommitdiff
path: root/src/library/structure
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/structure')
-rw-r--r--src/library/structure/heading.rs5
-rw-r--r--src/library/structure/list.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/library/structure/heading.rs b/src/library/structure/heading.rs
index 242912a3..af2b3626 100644
--- a/src/library/structure/heading.rs
+++ b/src/library/structure/heading.rs
@@ -92,8 +92,7 @@ impl Show for HeadingNode {
};
}
- let mut map = StyleMap::with_role(Role::Heading(self.level.get()));
-
+ let mut map = StyleMap::new();
map.set(TextNode::SIZE, resolve!(Self::SIZE));
if let Smart::Custom(family) = resolve!(Self::FAMILY) {
@@ -116,7 +115,7 @@ impl Show for HeadingNode {
realized = realized.underlined();
}
- realized = realized.styled_with_map(map);
+ realized = realized.styled_with_map(map).role(Role::Heading(self.level.get()));
realized = realized.spaced(
resolve!(Self::ABOVE).resolve(styles),
resolve!(Self::BELOW).resolve(styles),
diff --git a/src/library/structure/list.rs b/src/library/structure/list.rs
index 077536d4..015ef520 100644
--- a/src/library/structure/list.rs
+++ b/src/library/structure/list.rs
@@ -161,7 +161,9 @@ impl<const L: ListKind> Show for ListNode<L> {
}
}
- Ok(realized.role(Role::List(L == ORDERED)).spaced(above, below))
+ Ok(realized
+ .role(Role::List { ordered: L == ORDERED })
+ .spaced(above, below))
}
}