diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-10-31 09:11:56 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-10-31 09:11:56 +0100 |
| commit | 636bdb9e438cfe4fb075a981e0512b9a3dde3e60 (patch) | |
| tree | 8df8dd5decc756ddacd1e12f1262245f37c18980 /src/lib.rs | |
| parent | 237feda063a3a556658f1e3e34f7f8867e800f60 (diff) | |
Rename `RoleMap` to `LangItems`
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -108,8 +108,8 @@ pub struct Config { pub std: Scope, /// Defines which standard library items fulfill which syntactical roles. /// - /// Default: Typst's standard library's role map. - pub roles: RoleMap, + /// Default: Typst's standard library's language map. + pub items: LangItems, /// The default properties for page size, font selection and so on. /// /// Default: Empty style map. @@ -121,15 +121,15 @@ impl Default for Config { Self { root: PathBuf::new(), std: library::scope(), + items: library::items(), styles: StyleMap::new(), - roles: library::roles(), } } } /// Definition of certain standard library items the language is aware of. #[derive(Debug, Clone, Hash)] -pub struct RoleMap { +pub struct LangItems { pub strong: fn(Content) -> Content, pub emph: fn(Content) -> Content, pub raw: fn(EcoString, Option<EcoString>, bool) -> Content, |
