From f4fd6855e7fb833a2125d2e81aa3b9f548b18170 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 22 May 2023 20:50:15 +0200 Subject: 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 --- src/model/styles.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/model') 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 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 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 { -- cgit v1.2.3