diff options
| author | Martin Haug <mhaug@live.de> | 2022-06-08 18:43:00 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-06-08 19:26:20 +0200 |
| commit | 72d3f3fffabe6872eb7839585bea925b89aac6a4 (patch) | |
| tree | 2c55fc7bceb85d7ce94b09536ee02f5fedcd5fff /src/library/structure | |
| parent | 9dca4c2f7833055edd3c1682e98dcc3f86b7e31b (diff) | |
CR: Whoever said orange is the new pink was seriously disturbed.
Diffstat (limited to 'src/library/structure')
| -rw-r--r-- | src/library/structure/heading.rs | 5 | ||||
| -rw-r--r-- | src/library/structure/list.rs | 4 |
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)) } } |
