From 636bdb9e438cfe4fb075a981e0512b9a3dde3e60 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 31 Oct 2022 09:11:56 +0100 Subject: Rename `RoleMap` to `LangItems` --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib.rs') 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, bool) -> Content, -- cgit v1.2.3