summaryrefslogtreecommitdiff
path: root/library/src/structure
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-07 14:30:50 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-07 14:43:13 +0100
commit0a41844cc4e645e87fe48aa31ed3a4fd40a6ab11 (patch)
treec7cac97079491c8a11afae1211d7a80415fe64ef /library/src/structure
parentefd1853d069fbd1476e82d015da4d0d04cfaccc0 (diff)
Selectors
Diffstat (limited to 'library/src/structure')
-rw-r--r--library/src/structure/heading.rs4
-rw-r--r--library/src/structure/list.rs6
-rw-r--r--library/src/structure/reference.rs2
-rw-r--r--library/src/structure/table.rs4
4 files changed, 8 insertions, 8 deletions
diff --git a/library/src/structure/heading.rs b/library/src/structure/heading.rs
index 46e98c18..f93be5d9 100644
--- a/library/src/structure/heading.rs
+++ b/library/src/structure/heading.rs
@@ -78,8 +78,8 @@ impl HeadingNode {
}
impl Show for HeadingNode {
- fn unguard_parts(&self, sel: Selector) -> Content {
- Self { body: self.body.unguard(sel), ..*self }.pack()
+ fn unguard_parts(&self, id: RecipeId) -> Content {
+ Self { body: self.body.unguard(id), ..*self }.pack()
}
fn show(&self, _: Tracked<dyn World>, _: StyleChain) -> SourceResult<Content> {
diff --git a/library/src/structure/list.rs b/library/src/structure/list.rs
index 499207a4..89dc0f35 100644
--- a/library/src/structure/list.rs
+++ b/library/src/structure/list.rs
@@ -94,9 +94,9 @@ impl<const L: ListKind> ListNode<L> {
}
impl<const L: ListKind> Show for ListNode<L> {
- fn unguard_parts(&self, sel: Selector) -> Content {
+ fn unguard_parts(&self, id: RecipeId) -> Content {
Self {
- items: self.items.map(|item| item.unguard(sel)),
+ items: self.items.map(|item| item.unguard(id)),
..*self
}
.pack()
@@ -208,7 +208,7 @@ impl ListItem {
}
}
- fn unguard(&self, sel: Selector) -> Self {
+ fn unguard(&self, sel: RecipeId) -> Self {
match self {
Self::List(body) => Self::List(Box::new(body.unguard(sel))),
Self::Enum(number, body) => Self::Enum(*number, Box::new(body.unguard(sel))),
diff --git a/library/src/structure/reference.rs b/library/src/structure/reference.rs
index 18f4eecb..7004f49e 100644
--- a/library/src/structure/reference.rs
+++ b/library/src/structure/reference.rs
@@ -20,7 +20,7 @@ impl RefNode {
}
impl Show for RefNode {
- fn unguard_parts(&self, _: Selector) -> Content {
+ fn unguard_parts(&self, _: RecipeId) -> Content {
Self(self.0.clone()).pack()
}
diff --git a/library/src/structure/table.rs b/library/src/structure/table.rs
index fbf1c7c0..8c6191be 100644
--- a/library/src/structure/table.rs
+++ b/library/src/structure/table.rs
@@ -58,11 +58,11 @@ impl TableNode {
}
impl Show for TableNode {
- fn unguard_parts(&self, sel: Selector) -> Content {
+ fn unguard_parts(&self, id: RecipeId) -> Content {
Self {
tracks: self.tracks.clone(),
gutter: self.gutter.clone(),
- cells: self.cells.iter().map(|cell| cell.unguard(sel)).collect(),
+ cells: self.cells.iter().map(|cell| cell.unguard(id)).collect(),
}
.pack()
}