fix: don't check filter when group is std (#1972)

This commit is contained in:
Myriad-Dreamin 2025-08-03 10:44:42 +08:00 committed by paran3xus
parent ac4c0f8576
commit 5b0ce67327

View file

@ -109,7 +109,7 @@ impl GroupData {
static GROUPS: LazyLock<Vec<GroupData>> = LazyLock::new(|| {
let mut groups: Vec<GroupData> = yaml::from_str(include_str!("groups.yml")).unwrap();
for group in &mut groups {
if group.filter.is_empty() {
if group.filter.is_empty() && group.name != "std" {
group.filter = group
.module()
.scope()
@ -323,11 +323,13 @@ static ROUTE_MAPS: LazyLock<HashMap<CatKey, String>> = LazyLock::new(|| {
let route = format_route(parent_name.as_deref(), &name, &cat);
// Some types are defined multiple times, and the first one should take precedence.
// Some types are defined multiple times, and the first one should take
// precedence.
//
// For example, typst 0.13.0 renamed `pattern` to `tiling`, but keep `pattern` remains as a deprecated alias.
// Therefore, `Tiling` is first defined as `tiling`, then defined as `pattern` with deprecation again.
// https://typst.app/docs/changelog/0.13.0/#visualization
// For example, typst 0.13.0 renamed `pattern` to `tiling`, but keep
// `pattern` remains as a deprecated alias.
// Therefore, `Tiling` is first defined as `tiling`, then defined as
// `pattern` with deprecation again. https://typst.app/docs/changelog/0.13.0/#visualization
// https://github.com/typst/typst/blob/9a6268050fb769e18c4889fa5f59d4150e8878d6/crates/typst-library/src/visualize/mod.rs#L34
// https://github.com/typst/typst/blob/9a6268050fb769e18c4889fa5f59d4150e8878d6/crates/typst-library/src/visualize/mod.rs#L47-L49
map.entry(CatKey::Type(*t)).or_insert(route);