summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-22 20:50:15 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-22 20:56:30 +0200
commitf4fd6855e7fb833a2125d2e81aa3b9f548b18170 (patch)
tree6e3675ca8c4b9f9fae05a598e753e3a410d2cce2 /src
parent183997d5fe76cf0b41fd26bfa29d166071d239eb (diff)
Fix and simplify reference supplements
- Fixes #873 by properly handling `none` supplement for`ref`. - Fixes #523 by adding a `supplement` parameter to `math.equation` - In the future, we can remove supplement functions in favor of show-set rules with fine-grained selectors. Currently, this is not possible because show-set + synthesis doesn't play well together
Diffstat (limited to 'src')
-rw-r--r--src/model/styles.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/model/styles.rs b/src/model/styles.rs
index 2f33ef92..7ebb766c 100644
--- a/src/model/styles.rs
+++ b/src/model/styles.rs
@@ -463,6 +463,12 @@ impl Cast for LocatableSelector {
}
}
+impl From<LocatableSelector> for Value {
+ fn from(value: LocatableSelector) -> Self {
+ value.0.into()
+ }
+}
+
/// A selector that can be used with show rules.
///
/// Hopefully, this is made obsolete by a more powerful showing mechanism in the
@@ -518,6 +524,12 @@ impl Cast for ShowableSelector {
}
}
+impl From<ShowableSelector> for Value {
+ fn from(value: ShowableSelector) -> Self {
+ value.0.into()
+ }
+}
+
/// A show rule transformation that can be applied to a match.
#[derive(Clone, PartialEq, Hash)]
pub enum Transform {