diff --git a/docs/src/html.rs b/docs/src/html.rs
index d02f768e3..5363d1b26 100644
--- a/docs/src/html.rs
+++ b/docs/src/html.rs
@@ -308,8 +308,9 @@ impl<'a> Handler<'a> {
route.push_str(method);
} else if root == "$func" {
let mut parts = rest.split('.').peekable();
+ let first = parts.peek().copied();
let mut focus = &LIBRARY.global;
- while let Some(m) = parts.peek().and_then(|name| module(focus, name).ok()) {
+ while let Some(m) = first.and_then(|name| module(focus, name).ok()) {
focus = m;
parts.next();
}
@@ -324,6 +325,7 @@ impl<'a> Handler<'a> {
if let Some(group) = GROUPS
.iter()
+ .filter(|_| first == Some("math"))
.find(|group| group.functions.iter().any(|func| func == info.name))
{
route.push_str(&group.name);
diff --git a/src/eval/str.rs b/src/eval/str.rs
index 3c377595a..567ee5bd0 100644
--- a/src/eval/str.rs
+++ b/src/eval/str.rs
@@ -541,7 +541,7 @@ impl Hash for Regex {
}
cast_from_value! {
- Regex: "regular expression",
+ Regex: "regex",
}
/// A pattern which can be searched for in a string.
diff --git a/src/model/styles.rs b/src/model/styles.rs
index 7ebb766cc..e30a8a922 100644
--- a/src/model/styles.rs
+++ b/src/model/styles.rs
@@ -481,7 +481,7 @@ impl Cast for ShowableSelector {
matches!(
value,
Value::Symbol(_) | Value::Str(_) | Value::Label(_) | Value::Func(_)
- ) || value.type_name() == "regular expression"
+ ) || value.type_name() == "regex"
|| value.type_name() == "selector"
}
@@ -517,7 +517,7 @@ impl Cast for ShowableSelector {
CastInfo::Type("function"),
CastInfo::Type("label"),
CastInfo::Type("string"),
- CastInfo::Type("regular expression"),
+ CastInfo::Type("regex"),
CastInfo::Type("symbol"),
CastInfo::Type("selector"),
])
diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ
index 27a4b6a9d..2815dae85 100644
--- a/tests/typ/compiler/show-node.typ
+++ b/tests/typ/compiler/show-node.typ
@@ -96,7 +96,7 @@ Hey
= Heading
---
-// Error: 7-10 expected function, label, string, regular expression, symbol, or selector, found color
+// Error: 7-10 expected function, label, string, regex, symbol, or selector, found color
#show red: []
---