From 1a9bcaccec411cbc50a5d1ff64f266afaa63a29c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 23 Dec 2022 00:33:22 +0100 Subject: [PATCH] Fix typos --- library/src/basics/enum.rs | 2 +- library/src/basics/list.rs | 2 +- library/src/basics/table.rs | 2 +- library/src/basics/terms.rs | 2 +- library/src/compute/construct.rs | 2 +- library/src/layout/flow.rs | 4 ++-- library/src/layout/mod.rs | 2 +- library/src/layout/par.rs | 15 +++++---------- library/src/math/style.rs | 2 +- library/src/meta/outline.rs | 2 +- library/src/text/misc.rs | 6 +++--- library/src/text/quotes.rs | 2 +- library/src/text/shift.rs | 2 +- 13 files changed, 20 insertions(+), 25 deletions(-) diff --git a/library/src/basics/enum.rs b/library/src/basics/enum.rs index 81a36b615..f1784a7ef 100644 --- a/library/src/basics/enum.rs +++ b/library/src/basics/enum.rs @@ -42,7 +42,7 @@ use crate::text::TextNode; /// - items: Content (positional, variadic) /// The enumeration's children. /// -/// When using the enum syntax, adjacents items are automatically collected +/// When using the enum syntax, adjacent items are automatically collected /// into enumerations, even through constructs like for loops. /// /// ### Example diff --git a/library/src/basics/list.rs b/library/src/basics/list.rs index 24c7b21c2..fc666586d 100644 --- a/library/src/basics/list.rs +++ b/library/src/basics/list.rs @@ -38,7 +38,7 @@ use crate::text::TextNode; /// - items: Content (positional, variadic) /// The list's children. /// -/// When using the list syntax, adjacents items are automatically collected +/// When using the list syntax, adjacent items are automatically collected /// into lists, even through constructs like for loops. /// /// ### Example diff --git a/library/src/basics/table.rs b/library/src/basics/table.rs index 411a31fc9..01b16898e 100644 --- a/library/src/basics/table.rs +++ b/library/src/basics/table.rs @@ -4,7 +4,7 @@ use crate::prelude::*; /// # Table /// A table of items. /// -/// Tables are used to arrange content in cells. Cells can contain arbitray +/// Tables are used to arrange content in cells. Cells can contain arbitrary /// content, including multiple paragraphs and are specified in row-major order. /// Because tables are just grids with configurable cell properties, refer to /// the [grid documentation](@grid) for more information on how to size the diff --git a/library/src/basics/terms.rs b/library/src/basics/terms.rs index 1570d177f..1409350a9 100644 --- a/library/src/basics/terms.rs +++ b/library/src/basics/terms.rs @@ -24,7 +24,7 @@ use crate::text::{SpaceNode, TextNode}; /// - items: Content (positional, variadic) /// The term list's children. /// -/// When using the term list syntax, adjacents items are automatically +/// When using the term list syntax, adjacent items are automatically /// collected into term lists, even through constructs like for loops. /// /// ### Example diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index 81a8b9904..821a1416e 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -126,7 +126,7 @@ pub fn luma(args: &mut Args) -> SourceResult { /// /// ## Parameters /// - hex: EcoString (positional) -/// The color in hexademical notation. +/// The color in hexadecimal notation. /// /// Accepts three, four, six or eight hexadecimal digits and optionally /// a leading hashtag. diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs index 611e9ee13..4a8bed85e 100644 --- a/library/src/layout/flow.rs +++ b/library/src/layout/flow.rs @@ -5,7 +5,7 @@ use crate::prelude::*; /// Arrange spacing, paragraphs and block-level nodes into a flow. /// -/// This node is reponsible for layouting both the top-level content flow and +/// This node is responsible for layouting both the top-level content flow and /// the contents of boxes. #[capable(Layout)] #[derive(Hash)] @@ -244,7 +244,7 @@ impl<'a> FlowLayouter<'a> { } } - // Determine the size of the flow in this region dependening on whether + // Determine the size of the flow in this region depending on whether // the region expands. let mut size = self.expand.select(self.full, used); diff --git a/library/src/layout/mod.rs b/library/src/layout/mod.rs index 67b53e1b4..91822be83 100644 --- a/library/src/layout/mod.rs +++ b/library/src/layout/mod.rs @@ -227,7 +227,7 @@ impl<'a> Regions<'a> { /// An iterator that returns the sizes of the first and all following /// regions, equivalently to what would be produced by calling /// [`next()`](Self::next) repeatedly until all regions are exhausted. - /// This iterater may be infinite. + /// This iterator may be infinite. pub fn iter(&self) -> impl Iterator + '_ { let first = std::iter::once(self.first); let backlog = self.backlog.iter(); diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 25372bb67..aa4e0fd91 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -198,17 +198,17 @@ impl Resolve for HorizontalAlign { /// How to determine line breaks in a paragraph. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub enum Linebreaks { - /// Determine the linebreaks in a simple first-fit style. + /// Determine the line breaks in a simple first-fit style. Simple, - /// Optimize the linebreaks for the whole paragraph. + /// Optimize the line breaks for the whole paragraph. Optimized, } castable! { Linebreaks, - /// Determine the linebreaks in a simple first-fit style. + /// Determine the line breaks in a simple first-fit style. "simple" => Self::Simple, - /// Optimize the linebreaks for the whole paragraph. + /// Optimize the line breaks for the whole paragraph. /// /// Typst will try to produce more evenly filled lines of text by /// considering the whole paragraph when calculating line breaks. @@ -861,12 +861,7 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec> = Some(Smart::Auto); /// The maximum depth up to which headings are included in the outline. When - /// this arguement is `{none}`, all headings are included. + /// this argument is `{none}`, all headings are included. pub const DEPTH: Option = None; /// Whether to indent the subheadings to align the start of their numbering diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs index d05bf3ecf..75194a863 100644 --- a/library/src/text/misc.rs +++ b/library/src/text/misc.rs @@ -29,7 +29,7 @@ impl Behave for SpaceNode { /// # Line Break /// Inserts a line break. /// -/// Advances the paragraph to the next line. A single trailing linebreak at the +/// Advances the paragraph to the next line. A single trailing line break at the /// end of a paragraph is ignored, but more than one creates additional empty /// lines. /// @@ -41,7 +41,7 @@ impl Behave for SpaceNode { /// ``` /// /// ## Syntax -/// This function also has dedicated syntax: To insert a linebreak, simply write +/// This function also has dedicated syntax: To insert a line break, simply write /// a backslash followed by whitespace. This always creates an unjustified /// break. /// @@ -58,7 +58,7 @@ impl Behave for SpaceNode { /// #let jb = linebreak(justify: true) /// /// I have manually tuned the #jb -/// linebreaks in this paragraph #jb +/// line breaks in this paragraph #jb /// for an _interesting_ result. #jb /// ``` /// diff --git a/library/src/text/quotes.rs b/library/src/text/quotes.rs index 882787189..fa376b68b 100644 --- a/library/src/text/quotes.rs +++ b/library/src/text/quotes.rs @@ -64,7 +64,7 @@ impl SmartQuoteNode { } } -/// State machine for smart quote subtitution. +/// State machine for smart quote substitution. #[derive(Debug, Clone)] pub struct Quoter { /// How many quotes have been opened. diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index 1d78d8576..611ed4557 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -42,7 +42,7 @@ impl SubNode { /// N#sub(typographic: false)[1] /// ``` pub const TYPOGRAPHIC: bool = true; - /// The baseline shift for synthetic subcripts. Does not apply if + /// The baseline shift for synthetic subscripts. Does not apply if /// `typographic` is true and the font has subscript codepoints for the /// given `body`. pub const BASELINE: Length = Em::new(0.2).into();