diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-10-31 09:05:50 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-10-31 09:05:50 +0100 |
| commit | 237feda063a3a556658f1e3e34f7f8867e800f60 (patch) | |
| tree | de5d0fc18ab8407949f05503686121dd43a93c91 /src/library/structure | |
| parent | 66ad023519e5250f88f9066a2607efe5442a7b76 (diff) | |
Remove semantic role handling
Diffstat (limited to 'src/library/structure')
| -rw-r--r-- | src/library/structure/heading.rs | 7 | ||||
| -rw-r--r-- | src/library/structure/list.rs | 8 | ||||
| -rw-r--r-- | src/library/structure/table.rs | 9 |
3 files changed, 5 insertions, 19 deletions
diff --git a/src/library/structure/heading.rs b/src/library/structure/heading.rs index 01738496..c967c6d7 100644 --- a/src/library/structure/heading.rs +++ b/src/library/structure/heading.rs @@ -121,12 +121,7 @@ impl Show for HeadingNode { realized = realized.underlined(); } - let role = Role::Heading { - level: self.level, - outlined: styles.get(Self::OUTLINED), - }; - - realized = realized.styled_with_map(map).role(role); + realized = realized.styled_with_map(map); 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 4ccdbc54..082c98c3 100644 --- a/src/library/structure/list.rs +++ b/src/library/structure/list.rs @@ -128,11 +128,7 @@ impl<const L: ListKind> Show for ListNode<L> { cells.push(LayoutNode::default()); let label = if L == LIST || L == ENUM { - label - .resolve(world, L, number)? - .styled_with_map(map.clone()) - .role(Role::ListLabel) - .pack() + label.resolve(world, L, number)?.styled_with_map(map.clone()).pack() } else { LayoutNode::default() }; @@ -188,7 +184,7 @@ impl<const L: ListKind> Show for ListNode<L> { } } - Ok(realized.role(Role::List { ordered: L == ENUM }).spaced(above, below)) + Ok(realized.spaced(above, below)) } } diff --git a/src/library/structure/table.rs b/src/library/structure/table.rs index 7994f196..a2f583f7 100644 --- a/src/library/structure/table.rs +++ b/src/library/structure/table.rs @@ -52,11 +52,7 @@ impl Show for TableNode { Self { tracks: self.tracks.clone(), gutter: self.gutter.clone(), - cells: self - .cells - .iter() - .map(|cell| cell.unguard(sel).role(Role::TableCell)) - .collect(), + cells: self.cells.iter().map(|cell| cell.unguard(sel)).collect(), } .pack() } @@ -108,8 +104,7 @@ impl Show for TableNode { tracks: self.tracks.clone(), gutter: self.gutter.clone(), cells, - }) - .role(Role::Table)) + })) } fn finalize( |
