mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Undo regex type rename
Unnecessary breaking change for now
This commit is contained in:
parent
ad41482b70
commit
c65aaa9137
@ -567,7 +567,7 @@ impl Hash for Regex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cast! {
|
cast! {
|
||||||
type Regex: "regex",
|
type Regex: "regular expression",
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A pattern which can be searched for in a string.
|
/// A pattern which can be searched for in a string.
|
||||||
|
@ -241,7 +241,7 @@ impl Reflect for ShowableSelector {
|
|||||||
CastInfo::Type("function"),
|
CastInfo::Type("function"),
|
||||||
CastInfo::Type("label"),
|
CastInfo::Type("label"),
|
||||||
CastInfo::Type("string"),
|
CastInfo::Type("string"),
|
||||||
CastInfo::Type("regex"),
|
CastInfo::Type("regular expression"),
|
||||||
CastInfo::Type("symbol"),
|
CastInfo::Type("symbol"),
|
||||||
CastInfo::Type("selector"),
|
CastInfo::Type("selector"),
|
||||||
])
|
])
|
||||||
@ -250,7 +250,12 @@ impl Reflect for ShowableSelector {
|
|||||||
fn castable(value: &Value) -> bool {
|
fn castable(value: &Value) -> bool {
|
||||||
matches!(
|
matches!(
|
||||||
value.type_name(),
|
value.type_name(),
|
||||||
"symbol" | "string" | "label" | "function" | "regex" | "selector"
|
"symbol"
|
||||||
|
| "string"
|
||||||
|
| "label"
|
||||||
|
| "function"
|
||||||
|
| "regular expression"
|
||||||
|
| "selector"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ Hey
|
|||||||
= Heading
|
= Heading
|
||||||
|
|
||||||
---
|
---
|
||||||
// Error: 7-10 expected function, label, string, regex, symbol, or selector, found color
|
// Error: 7-10 expected function, label, string, regular expression, symbol, or selector, found color
|
||||||
#show red: []
|
#show red: []
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user