From 25acefeb5b0cf0977ad01fe3128d494d9617a2cf Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Wed, 22 Mar 2023 16:02:51 +0800 Subject: Fix typos (#115) Found via `codespell -S target -L crate,ist,thi,alle,dedented,ue,tung,nd,ende,overriden,dependant` --- library/src/layout/flow.rs | 2 +- library/src/layout/grid.rs | 2 +- library/src/layout/par.rs | 4 ++-- library/src/layout/stack.rs | 2 +- library/src/meta/reference.rs | 2 +- library/src/text/quotes.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'library/src') diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs index b6476816..da2ddba6 100644 --- a/library/src/layout/flow.rs +++ b/library/src/layout/flow.rs @@ -75,7 +75,7 @@ struct FlowLayouter<'a> { regions: Regions<'a>, /// Whether the flow should expand to fill the region. expand: Axes, - /// The intial size of `regions.size` that was available before we started + /// The initial size of `regions.size` that was available before we started /// subtracting. initial: Size, /// Whether the last block was a paragraph. diff --git a/library/src/layout/grid.rs b/library/src/layout/grid.rs index 5c3d132e..e0c8b684 100644 --- a/library/src/layout/grid.rs +++ b/library/src/layout/grid.rs @@ -659,7 +659,7 @@ impl<'a, 'v> GridLayouter<'a, 'v> { assert!(x < self.cols.len()); assert!(y < self.rows.len()); - // Columns are reorded, but the cell slice is not. + // Columns are reorder, but the cell slice is not. if self.is_rtl { x = self.cols.len() - 1 - x; } diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index db65b125..dc445c86 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -395,7 +395,7 @@ impl SpanMapper { /// A layouted line, consisting of a sequence of layouted paragraph items that /// are mostly borrowed from the preparation phase. This type enables you to -/// measure the size of a line in a range before comitting to building the +/// measure the size of a line in a range before committing to building the /// line's frame. /// /// At most two paragraph items must be created individually for this line: The @@ -889,7 +889,7 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec StackLayouter<'a> { /// Advance to the next region. fn finish_region(&mut self) { - // Determine the size of the stack in this region dependening on whether + // Determine the size of the stack in this region depending on whether // the region expands. let mut size = self .expand diff --git a/library/src/meta/reference.rs b/library/src/meta/reference.rs index c103dd02..14246436 100644 --- a/library/src/meta/reference.rs +++ b/library/src/meta/reference.rs @@ -146,7 +146,7 @@ impl Show for RefElem { } impl RefElem { - /// Turn the rference into a citation. + /// Turn the reference into a citation. pub fn to_citation(&self, styles: StyleChain) -> CiteElem { let mut elem = CiteElem::new(vec![self.target().0]); elem.0.set_location(self.0.location().unwrap()); diff --git a/library/src/text/quotes.rs b/library/src/text/quotes.rs index be923304..97b07746 100644 --- a/library/src/text/quotes.rs +++ b/library/src/text/quotes.rs @@ -109,7 +109,7 @@ fn is_opening_bracket(c: char) -> bool { matches!(c, '(' | '{' | '[') } -/// Decides which quotes to subtitute smart quotes with. +/// Decides which quotes to substitute smart quotes with. pub struct Quotes<'s> { /// The opening single quote. pub single_open: &'s str, -- cgit v1.2.3