Fix doc links

This commit is contained in:
Laurenz 2023-05-30 14:49:24 +02:00
parent f90fcd664b
commit 25e94cef03
4 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -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.

View File

@ -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"),
])

View File

@ -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: []
---