fix: don't allow type completion in string content (#1420)

This commit is contained in:
Myriad-Dreamin 2025-02-27 16:50:27 +08:00 committed by GitHub
parent 1fe422f963
commit 0cb12786b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -614,9 +614,6 @@ impl CompletionPair<'_, '_, '_> {
BuiltinTy::Path(..) | BuiltinTy::TextFont | BuiltinTy::TextFeature,
) => true,
Ty::Value(val) => matches!(val.val, Value::Str(..)),
Ty::Builtin(BuiltinTy::Type(ty)) => {
*ty == Type::of::<typst::foundations::Str>()
}
_ => false,
},
_ => true,