summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-10-31 09:11:56 +0100
committerLaurenz <laurmaedje@gmail.com>2022-10-31 09:11:56 +0100
commit636bdb9e438cfe4fb075a981e0512b9a3dde3e60 (patch)
tree8df8dd5decc756ddacd1e12f1262245f37c18980 /src/lib.rs
parent237feda063a3a556658f1e3e34f7f8867e800f60 (diff)
Rename `RoleMap` to `LangItems`
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5acb8a90..c7e47ffa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,