Fix typst-docs

This commit is contained in:
T0mstone 2025-04-09 16:17:42 +02:00
parent 9c4b0eadb0
commit a26c368088
4 changed files with 6 additions and 4 deletions

3
Cargo.lock generated
View File

@ -413,7 +413,7 @@ dependencies = [
[[package]] [[package]]
name = "codex" name = "codex"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/typst/codex?rev=b99817a19c6249607a27010dfc86c8a90d43d494#b99817a19c6249607a27010dfc86c8a90d43d494" source = "git+https://github.com/typst/codex?rev=17d2dff8d13ae526c6429810d602f466a2bb4424#17d2dff8d13ae526c6429810d602f466a2bb4424"
[[package]] [[package]]
name = "color-print" name = "color-print"
@ -2913,6 +2913,7 @@ name = "typst-docs"
version = "0.13.1" version = "0.13.1"
dependencies = [ dependencies = [
"clap", "clap",
"codex",
"ecow", "ecow",
"heck", "heck",
"pulldown-cmark", "pulldown-cmark",

View File

@ -49,7 +49,7 @@ clap_mangen = "0.2.10"
codespan-reporting = "0.11" codespan-reporting = "0.11"
# TODO: change this when codex#46 gets merged and codex gets released with that # TODO: change this when codex#46 gets merged and codex gets released with that
# codex = "0.1.1" # codex = "0.1.1"
codex = { git = "https://github.com/typst/codex", rev = "b99817a19c6249607a27010dfc86c8a90d43d494" } codex = { git = "https://github.com/typst/codex", rev = "17d2dff8d13ae526c6429810d602f466a2bb4424" }
color-print = "0.3.6" color-print = "0.3.6"
comemo = "0.4" comemo = "0.4"
csv = "1" csv = "1"

View File

@ -22,6 +22,7 @@ typst-utils = { workspace = true }
typst-assets = { workspace = true, features = ["fonts"] } typst-assets = { workspace = true, features = ["fonts"] }
typst-dev-assets = { workspace = true } typst-dev-assets = { workspace = true }
clap = { workspace = true, optional = true } clap = { workspace = true, optional = true }
codex = { workspace = true }
ecow = { workspace = true } ecow = { workspace = true }
heck = { workspace = true } heck = { workspace = true }
pulldown-cmark = { workspace = true } pulldown-cmark = { workspace = true }

View File

@ -712,11 +712,11 @@ fn symbols_model(resolver: &dyn Resolver, group: &GroupData) -> SymbolsModel {
let mut list = vec![]; let mut list = vec![];
for (name, binding) in group.module().scope().iter() { for (name, binding) in group.module().scope().iter() {
let Value::Symbol(symbol) = binding.read() else { continue }; let Value::Symbol(symbol) = binding.read() else { continue };
let complete = |variant: &str| { let complete = |variant: codex::ModifierSet<&str>| {
if variant.is_empty() { if variant.is_empty() {
name.clone() name.clone()
} else { } else {
eco_format!("{}.{}", name, variant) eco_format!("{}.{}", name, variant.as_str())
} }
}; };