From ff107cf3e75acf041f8b7631337d299cdeaa1685 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 12 Dec 2019 22:19:38 +0100 Subject: =?UTF-8?q?Tidying=20up=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/library/direction.rs | 2 +- src/library/mod.rs | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src/library') diff --git a/src/library/direction.rs b/src/library/direction.rs index 3b9956d1..7edad323 100644 --- a/src/library/direction.rs +++ b/src/library/direction.rs @@ -3,7 +3,7 @@ use super::maps::ConsistentMap; use super::keys::AxisKey; function! { - /// `direction`: Sets the directions for the layouting axes. + /// `direction`: Sets the directions of the layouting axes. #[derive(Debug, PartialEq)] pub struct Direction { body: Option, diff --git a/src/library/mod.rs b/src/library/mod.rs index 342b2721..b6561d5a 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -1,18 +1,17 @@ -//! The standard library for the _Typst_ language. +//! The standard library. -use crate::func::prelude::*; use toddle::query::FontClass; -use keys::*; -use maps::*; - -pub_use_mod!(align); -pub_use_mod!(boxed); -pub_use_mod!(direction); +use crate::func::prelude::*; +use self::keys::*; +use self::maps::*; pub mod maps; pub mod keys; +pub_use_mod!(align); +pub_use_mod!(boxed); +pub_use_mod!(direction); /// Create a scope with all standard functions. pub fn std() -> Scope { @@ -100,7 +99,7 @@ function! { } function! { - /// `page.margins`: Set the margins of pages. + /// `page.margins`: Sets the page margins. #[derive(Debug, PartialEq)] pub struct PageMargins { map: PaddingMap, @@ -121,7 +120,7 @@ function! { } function! { - /// `spacing`, `h`, `v`: Add spacing along an axis. + /// `spacing`, `h`, `v`: Adds spacing along an axis. #[derive(Debug, PartialEq)] pub struct Spacing { axis: AxisKey, @@ -192,7 +191,7 @@ function! { } function! { - /// `font.size`: Set the font size. + /// `font.size`: Sets the font size. #[derive(Debug, PartialEq)] pub struct FontSize { body: Option, @@ -206,7 +205,7 @@ function! { } } - layout(self, mut ctx) { + layout(self, ctx) { let mut style = ctx.style.text.clone(); style.font_size = self.size; -- cgit v1.2.3