summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorYip Coekjan <69834864+Coekjan@users.noreply.github.com>2024-06-14 00:57:34 +0800
committerGitHub <noreply@github.com>2024-06-13 16:57:34 +0000
commit6f9855a8c39bea36a06496a34a9083a12c93308b (patch)
treee73509018fea80eef8b2c822eb1fd9ad2e8fb110 /docs
parentad4ef68a112dedabf80f885a02bcb574eb9af9e4 (diff)
Make symbols callable like functions & migrate callable accents to callable symbols (#4299)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs
index 8af7dc0d..231fe97c 100644
--- a/docs/src/lib.rs
+++ b/docs/src/lib.rs
@@ -661,15 +661,15 @@ fn symbols_model(resolver: &dyn Resolver, group: &GroupData) -> SymbolsModel {
for (variant, c) in symbol.variants() {
let shorthand = |list: &[(&'static str, char)]| {
- list.iter().copied().find(|&(_, x)| x == c).map(|(s, _)| s)
+ list.iter().copied().find(|&(_, x)| x == c.char()).map(|(s, _)| s)
};
list.push(SymbolModel {
name: complete(variant),
markup_shorthand: shorthand(typst::syntax::ast::Shorthand::MARKUP_LIST),
math_shorthand: shorthand(typst::syntax::ast::Shorthand::MATH_LIST),
- codepoint: c as u32,
- accent: typst::symbols::Symbol::combining_accent(c).is_some(),
+ codepoint: c.char() as _,
+ accent: typst::math::Accent::combine(c.char()).is_some(),
alternates: symbol
.variants()
.filter(|(other, _)| other != &variant)