mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix doc links
This commit is contained in:
parent
f90fcd664b
commit
25e94cef03
@ -308,8 +308,9 @@ impl<'a> Handler<'a> {
|
|||||||
route.push_str(method);
|
route.push_str(method);
|
||||||
} else if root == "$func" {
|
} else if root == "$func" {
|
||||||
let mut parts = rest.split('.').peekable();
|
let mut parts = rest.split('.').peekable();
|
||||||
|
let first = parts.peek().copied();
|
||||||
let mut focus = &LIBRARY.global;
|
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;
|
focus = m;
|
||||||
parts.next();
|
parts.next();
|
||||||
}
|
}
|
||||||
@ -324,6 +325,7 @@ impl<'a> Handler<'a> {
|
|||||||
|
|
||||||
if let Some(group) = GROUPS
|
if let Some(group) = GROUPS
|
||||||
.iter()
|
.iter()
|
||||||
|
.filter(|_| first == Some("math"))
|
||||||
.find(|group| group.functions.iter().any(|func| func == info.name))
|
.find(|group| group.functions.iter().any(|func| func == info.name))
|
||||||
{
|
{
|
||||||
route.push_str(&group.name);
|
route.push_str(&group.name);
|
||||||
|
@ -541,7 +541,7 @@ impl Hash for Regex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cast_from_value! {
|
cast_from_value! {
|
||||||
Regex: "regular expression",
|
Regex: "regex",
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A pattern which can be searched for in a string.
|
/// A pattern which can be searched for in a string.
|
||||||
|
@ -481,7 +481,7 @@ impl Cast for ShowableSelector {
|
|||||||
matches!(
|
matches!(
|
||||||
value,
|
value,
|
||||||
Value::Symbol(_) | Value::Str(_) | Value::Label(_) | Value::Func(_)
|
Value::Symbol(_) | Value::Str(_) | Value::Label(_) | Value::Func(_)
|
||||||
) || value.type_name() == "regular expression"
|
) || value.type_name() == "regex"
|
||||||
|| value.type_name() == "selector"
|
|| value.type_name() == "selector"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ impl Cast for ShowableSelector {
|
|||||||
CastInfo::Type("function"),
|
CastInfo::Type("function"),
|
||||||
CastInfo::Type("label"),
|
CastInfo::Type("label"),
|
||||||
CastInfo::Type("string"),
|
CastInfo::Type("string"),
|
||||||
CastInfo::Type("regular expression"),
|
CastInfo::Type("regex"),
|
||||||
CastInfo::Type("symbol"),
|
CastInfo::Type("symbol"),
|
||||||
CastInfo::Type("selector"),
|
CastInfo::Type("selector"),
|
||||||
])
|
])
|
||||||
|
@ -96,7 +96,7 @@ Hey
|
|||||||
= Heading
|
= 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: []
|
#show red: []
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user