summaryrefslogtreecommitdiff
path: root/src/model/cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/cast.rs')
-rw-r--r--src/model/cast.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/model/cast.rs b/src/model/cast.rs
index 7a466b72..d2e10a1f 100644
--- a/src/model/cast.rs
+++ b/src/model/cast.rs
@@ -1,7 +1,7 @@
use std::num::NonZeroUsize;
use std::str::FromStr;
-use super::{Content, Pattern, Regex, Transform, Value};
+use super::{Content, Regex, Selector, Transform, Value};
use crate::diag::{with_alternative, StrResult};
use crate::font::{FontStretch, FontStyle, FontWeight};
use crate::frame::{Destination, Lang, Location, Region};
@@ -181,10 +181,9 @@ dynamic! {
Regex: "regular expression",
}
-castable! {
- Pattern,
- Expected: "function, string or regular expression",
- Value::Func(func) => Self::Node(func.node()?),
+dynamic! {
+ Selector: "selector",
+ Value::Func(func) => Self::Node(func.node()?, None),
Value::Str(text) => Self::text(&text),
@regex: Regex => Self::Regex(regex.clone()),
}