summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorJosh Soref <2119212+jsoref@users.noreply.github.com>2024-09-26 13:32:55 -0400
committerGitHub <noreply@github.com>2024-09-26 17:32:55 +0000
commitca1f749c087bc19f6fbcebcd3ee34307959a95d5 (patch)
treeafa4bc0fca4b27d15b99df6da625090b0ef864f2 /crates
parent3c90878460cecaaa7ac879ba0973f94705b7c062 (diff)
Spelling (#5020)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-cli/src/terminal.rs2
-rw-r--r--crates/typst-kit/Cargo.toml2
-rw-r--r--crates/typst-kit/src/fonts.rs2
-rw-r--r--crates/typst-kit/src/lib.rs2
-rw-r--r--crates/typst-kit/src/package.rs4
-rw-r--r--crates/typst-pdf/src/font.rs2
-rw-r--r--crates/typst-pdf/src/image.rs2
-rw-r--r--crates/typst-pdf/src/lib.rs2
-rw-r--r--crates/typst-syntax/src/ast.rs2
-rw-r--r--crates/typst-syntax/src/parser.rs2
-rw-r--r--crates/typst/src/foundations/content.rs2
-rw-r--r--crates/typst/src/foundations/func.rs2
-rw-r--r--crates/typst/src/introspection/locator.rs8
-rw-r--r--crates/typst/src/layout/corners.rs2
-rw-r--r--crates/typst/src/layout/inline/line.rs2
-rw-r--r--crates/typst/src/layout/inline/shaping.rs2
-rw-r--r--crates/typst/src/layout/pages/collect.rs2
-rw-r--r--crates/typst/src/layout/sides.rs2
-rw-r--r--crates/typst/src/math/equation.rs2
-rw-r--r--crates/typst/src/math/matrix.rs2
-rw-r--r--crates/typst/src/model/enum.rs2
-rw-r--r--crates/typst/src/realize.rs2
-rw-r--r--crates/typst/src/visualize/color.rs2
-rw-r--r--crates/typst/src/visualize/image/mod.rs2
-rw-r--r--crates/typst/src/visualize/shape.rs2
25 files changed, 29 insertions, 29 deletions
diff --git a/crates/typst-cli/src/terminal.rs b/crates/typst-cli/src/terminal.rs
index 45b8c82b..cdf22ac5 100644
--- a/crates/typst-cli/src/terminal.rs
+++ b/crates/typst-cli/src/terminal.rs
@@ -59,7 +59,7 @@ impl TermOut {
// We don't want to clear anything that is not a TTY.
if self.inner.stream.supports_color() {
// First, move the cursor up `lines` lines.
- // Then, clear everything between between the cursor to end of screen.
+ // Then, clear everything between the cursor to end of screen.
let mut stream = self.inner.stream.lock();
write!(stream, "\x1B[1F\x1B[0J")?;
stream.flush()?;
diff --git a/crates/typst-kit/Cargo.toml b/crates/typst-kit/Cargo.toml
index 770722c6..de412ac8 100644
--- a/crates/typst-kit/Cargo.toml
+++ b/crates/typst-kit/Cargo.toml
@@ -33,7 +33,7 @@ openssl = { workspace = true, optional = true }
[features]
default = ["fonts", "packages"]
-# Add font loading utilitites
+# Add font loading utilities
fonts = ["dep:fontdb", "fontdb/memmap", "fontdb/fontconfig"]
# Add generic downloading utilities
diff --git a/crates/typst-kit/src/fonts.rs b/crates/typst-kit/src/fonts.rs
index 07a41f4b..8f85bfdc 100644
--- a/crates/typst-kit/src/fonts.rs
+++ b/crates/typst-kit/src/fonts.rs
@@ -161,7 +161,7 @@ impl FontSearcher {
let path = match &face.source {
Source::File(path) | Source::SharedFile(path, _) => path,
// We never add binary sources to the database, so there
- // shouln't be any.
+ // shouldn't be any.
Source::Binary(_) => continue,
};
diff --git a/crates/typst-kit/src/lib.rs b/crates/typst-kit/src/lib.rs
index 4301727f..d0ea82ef 100644
--- a/crates/typst-kit/src/lib.rs
+++ b/crates/typst-kit/src/lib.rs
@@ -11,7 +11,7 @@
//! - For math: New Computer Modern Math
//! - For code: Deja Vu Sans Mono
//! - [download] contains functionality for making simple web requests with
-//! status reporting, useful for downloading packages from package registires.
+//! status reporting, useful for downloading packages from package registries.
//! It is enabled by the `downloads` feature flag, additionally the
//! `vendor-openssl` can be used on operating systems other than macOS and
//! Windows to vendor OpenSSL when building.
diff --git a/crates/typst-kit/src/package.rs b/crates/typst-kit/src/package.rs
index 3c9e6529..c5c470db 100644
--- a/crates/typst-kit/src/package.rs
+++ b/crates/typst-kit/src/package.rs
@@ -52,13 +52,13 @@ impl PackageStorage {
}
}
- /// Returns a the path at which non-local packages should be stored when
+ /// Returns the path at which non-local packages should be stored when
/// downloaded.
pub fn package_cache_path(&self) -> Option<&Path> {
self.package_cache_path.as_deref()
}
- /// Returns a the path at which local packages are stored.
+ /// Returns the path at which local packages are stored.
pub fn package_path(&self) -> Option<&Path> {
self.package_path.as_deref()
}
diff --git a/crates/typst-pdf/src/font.rs b/crates/typst-pdf/src/font.rs
index c88c2bfd..eb2c2b3b 100644
--- a/crates/typst-pdf/src/font.rs
+++ b/crates/typst-pdf/src/font.rs
@@ -198,7 +198,7 @@ pub fn write_font_descriptor<'a>(
#[typst_macros::time(name = "subset font")]
fn subset_font(font: &Font, glyph_remapper: &GlyphRemapper) -> Arc<Vec<u8>> {
let data = font.data();
- // TODO: Fail export instead of unwrapping once export diagnoistics exist.
+ // TODO: Fail export instead of unwrapping once export diagnostics exist.
let subsetted = subsetter::subset(data, font.index(), glyph_remapper).unwrap();
let mut data = subsetted.as_ref();
diff --git a/crates/typst-pdf/src/image.rs b/crates/typst-pdf/src/image.rs
index 83797501..7bcd83e7 100644
--- a/crates/typst-pdf/src/image.rs
+++ b/crates/typst-pdf/src/image.rs
@@ -183,7 +183,7 @@ fn encode_alpha(raster: &RasterImage) -> (Vec<u8>, Filter) {
/// Encode an SVG into a chunk of PDF objects.
#[typst_macros::time(name = "encode svg")]
fn encode_svg(svg: &SvgImage) -> (Chunk, Ref) {
- // TODO: Don't unwrap once we have export diagostics.
+ // TODO: Don't unwrap once we have export diagnostics.
svg2pdf::to_chunk(svg.tree(), svg2pdf::ConversionOptions::default()).unwrap()
}
diff --git a/crates/typst-pdf/src/lib.rs b/crates/typst-pdf/src/lib.rs
index 9af830bd..ae05a43b 100644
--- a/crates/typst-pdf/src/lib.rs
+++ b/crates/typst-pdf/src/lib.rs
@@ -417,7 +417,7 @@ struct PdfChunk {
/// chunk, and should be remapped.
///
/// This is a constant (large enough to avoid collisions) and not
-/// dependant on self.alloc to allow for better memoization of steps, if
+/// dependent on self.alloc to allow for better memoization of steps, if
/// needed in the future.
const TEMPORARY_REFS_START: i32 = 1_000_000_000;
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs
index 5cd28de3..34bd0110 100644
--- a/crates/typst-syntax/src/ast.rs
+++ b/crates/typst-syntax/src/ast.rs
@@ -675,7 +675,7 @@ impl<'a> TermItem<'a> {
}
node! {
- /// A mathemathical equation: `$x$`, `$ x^2 $`.
+ /// A mathematical equation: `$x$`, `$ x^2 $`.
Equation
}
diff --git a/crates/typst-syntax/src/parser.rs b/crates/typst-syntax/src/parser.rs
index aa0431e9..20ff58f0 100644
--- a/crates/typst-syntax/src/parser.rs
+++ b/crates/typst-syntax/src/parser.rs
@@ -1789,7 +1789,7 @@ impl<'s> Parser<'s> {
fn next_non_trivia(lexer: &mut Lexer<'s>) -> SyntaxKind {
loop {
let next = lexer.next();
- // Loop is terminatable, because SyntaxKind::End is not a trivia.
+ // Loop is terminable, because SyntaxKind::End is not a trivia.
if !next.is_trivia() {
break next;
}
diff --git a/crates/typst/src/foundations/content.rs b/crates/typst/src/foundations/content.rs
index 91c911ed..9e26b179 100644
--- a/crates/typst/src/foundations/content.rs
+++ b/crates/typst/src/foundations/content.rs
@@ -72,7 +72,7 @@ use crate::utils::{fat, singleton, LazyHash, SmallBitSet};
#[derive(Clone, Hash)]
#[allow(clippy::derived_hash_with_manual_eq)]
pub struct Content {
- /// The partially element-dependant inner data.
+ /// The partially element-dependent inner data.
inner: Arc<Inner<dyn Bounds>>,
/// The element's source code location.
span: Span,
diff --git a/crates/typst/src/foundations/func.rs b/crates/typst/src/foundations/func.rs
index 87f3dc4c..7ba7496f 100644
--- a/crates/typst/src/foundations/func.rs
+++ b/crates/typst/src/foundations/func.rs
@@ -356,7 +356,7 @@ impl Func {
/// #show heading.where(level: 2): set text(blue)
/// = Section
/// == Subsection
- /// === Sub-subection
+ /// === Sub-subsection
/// ```
#[func]
pub fn where_(
diff --git a/crates/typst/src/introspection/locator.rs b/crates/typst/src/introspection/locator.rs
index e6a707e9..3e9e5c89 100644
--- a/crates/typst/src/introspection/locator.rs
+++ b/crates/typst/src/introspection/locator.rs
@@ -62,7 +62,7 @@ use crate::introspection::{Introspector, Location};
/// - A very simple way to generate unique IDs would be to just increase a
/// counter for each element. In this setup, (1) is somewhat satisfied: In
/// principle, the counter will line up across iterations, but things start to
-/// break down once we generate content dependant on introspection since the
+/// break down once we generate content dependent on introspection since the
/// IDs generated for that new content will shift the IDs for all following
/// elements in the document. (2) is not satisfied since an edit in the middle
/// of the document shifts all later IDs. (3) is obviously not satisfied.
@@ -76,7 +76,7 @@ use crate::introspection::{Introspector, Location};
/// e.g. `#for _ in range(5) { figure(..) }`. To handle this case, we can then
/// disambiguate elements with the same span with an increasing counter. In
/// this setup, (1) is mostly satisfied: Unless we do stuff like generating
-/// colliding counter updates dependant on introspection, things will line up.
+/// colliding counter updates dependent on introspection, things will line up.
/// (2) is also reasonably well satisfied, as typical edits will only affect
/// the single element at the currently edited span. Only if we edit inside of
/// a function, loop, or similar construct, we will affect multiple elements.
@@ -114,7 +114,7 @@ use crate::introspection::{Introspector, Location};
/// locations assigned during measurement match up exactly with the locations of
/// real document elements. Without this guarantee, many introspection-driven
/// features (like counters, state, and citations) don't work correctly (since
-/// they perform queries dependant on concrete locations).
+/// they perform queries dependent on concrete locations).
///
/// This is all fine and good, but things get really tricky when the _user_
/// measures such introspecting content since the user isn't kindly managing
@@ -168,7 +168,7 @@ impl<'a> Locator<'a> {
/// Creates a new synthetic locator.
///
- /// This can be used to create a new dependant layout based on an element.
+ /// This can be used to create a new dependent layout based on an element.
/// This is used for layouting footnote entries based on the location
/// of the associated footnote.
pub fn synthesize(location: Location) -> Self {
diff --git a/crates/typst/src/layout/corners.rs b/crates/typst/src/layout/corners.rs
index cfd6b7ac..075f51bc 100644
--- a/crates/typst/src/layout/corners.rs
+++ b/crates/typst/src/layout/corners.rs
@@ -241,7 +241,7 @@ impl<T: Resolve> Resolve for Corners<T> {
impl<T: Fold> Fold for Corners<Option<T>> {
fn fold(self, outer: Self) -> Self {
- // Usually, folding an inner `None` with an `outer` preferres the
+ // Usually, folding an inner `None` with an `outer` prefers the
// explicit `None`. However, here `None` means unspecified and thus
// we want `outer`, so we use `fold_or` to opt into such behavior.
self.zip(outer).map(|(inner, outer)| inner.fold_or(outer))
diff --git a/crates/typst/src/layout/inline/line.rs b/crates/typst/src/layout/inline/line.rs
index 7115630e..a7c41977 100644
--- a/crates/typst/src/layout/inline/line.rs
+++ b/crates/typst/src/layout/inline/line.rs
@@ -225,7 +225,7 @@ fn collect_items<'a>(
items
}
-/// Calls `f` for the the BiDi-reordered ranges of a line.
+/// Calls `f` for the BiDi-reordered ranges of a line.
fn reorder<F>(p: &Preparation, range: Range, mut f: F)
where
F: FnMut(Range, bool),
diff --git a/crates/typst/src/layout/inline/shaping.rs b/crates/typst/src/layout/inline/shaping.rs
index 0b4a17d7..4344192c 100644
--- a/crates/typst/src/layout/inline/shaping.rs
+++ b/crates/typst/src/layout/inline/shaping.rs
@@ -88,7 +88,7 @@ pub struct ShapedGlyph {
#[derive(Debug, Clone, Default)]
pub struct Adjustability {
- /// The left and right strechability
+ /// The left and right stretchability
pub stretchability: (Em, Em),
/// The left and right shrinkability
pub shrinkability: (Em, Em),
diff --git a/crates/typst/src/layout/pages/collect.rs b/crates/typst/src/layout/pages/collect.rs
index f1db63c7..934fa415 100644
--- a/crates/typst/src/layout/pages/collect.rs
+++ b/crates/typst/src/layout/pages/collect.rs
@@ -117,7 +117,7 @@ pub fn collect<'a>(
items
}
-/// Migrates trailing start tags without accompanying end tags tags from before
+/// Migrates trailing start tags without accompanying end tags from before
/// a pagebreak to after it. Returns the position right after the last
/// non-migrated tag.
///
diff --git a/crates/typst/src/layout/sides.rs b/crates/typst/src/layout/sides.rs
index 75d4e25b..61d6a1fd 100644
--- a/crates/typst/src/layout/sides.rs
+++ b/crates/typst/src/layout/sides.rs
@@ -254,7 +254,7 @@ impl<T: Resolve> Resolve for Sides<T> {
impl<T: Fold> Fold for Sides<Option<T>> {
fn fold(self, outer: Self) -> Self {
- // Usually, folding an inner `None` with an `outer` preferres the
+ // Usually, folding an inner `None` with an `outer` prefers the
// explicit `None`. However, here `None` means unspecified and thus
// we want `outer`, so we use `fold_or` to opt into such behavior.
self.zip(outer).map(|(inner, outer)| inner.fold_or(outer))
diff --git a/crates/typst/src/math/equation.rs b/crates/typst/src/math/equation.rs
index ffefea74..bf5ef9dd 100644
--- a/crates/typst/src/math/equation.rs
+++ b/crates/typst/src/math/equation.rs
@@ -513,7 +513,7 @@ fn add_equation_number(
equation
}
-/// Resize the equation's frame accordingly so that it emcompasses the number.
+/// Resize the equation's frame accordingly so that it encompasses the number.
fn resize_equation(
equation: &mut Frame,
number: &Frame,
diff --git a/crates/typst/src/math/matrix.rs b/crates/typst/src/math/matrix.rs
index 345c6605..a8b8bacf 100644
--- a/crates/typst/src/math/matrix.rs
+++ b/crates/typst/src/math/matrix.rs
@@ -683,7 +683,7 @@ impl<T: Numeric + Fold> Fold for Augment<T> {
(Smart::Custom(inner), Smart::Custom(outer)) => {
Smart::Custom(inner.fold(outer))
}
- // Usually, folding an inner `auto` with an `outer` preferres
+ // Usually, folding an inner `auto` with an `outer` prefers
// the explicit `auto`. However, here `auto` means unspecified
// and thus we want `outer`.
(inner, outer) => inner.or(outer),
diff --git a/crates/typst/src/model/enum.rs b/crates/typst/src/model/enum.rs
index 32a400e8..7976a537 100644
--- a/crates/typst/src/model/enum.rs
+++ b/crates/typst/src/model/enum.rs
@@ -140,7 +140,7 @@ pub struct EnumElem {
/// #set enum(numbering: "1.a)", full: true)
/// + Cook
/// + Heat water
- /// + Add integredients
+ /// + Add ingredients
/// + Eat
/// ```
#[default(false)]
diff --git a/crates/typst/src/realize.rs b/crates/typst/src/realize.rs
index 77593554..97c53ace 100644
--- a/crates/typst/src/realize.rs
+++ b/crates/typst/src/realize.rs
@@ -257,7 +257,7 @@ fn visit<'a>(
return Ok(());
}
- // Apply show rules rules and preparation.
+ // Apply show rules and preparation.
if visit_show_rules(s, content, styles)? {
return Ok(());
}
diff --git a/crates/typst/src/visualize/color.rs b/crates/typst/src/visualize/color.rs
index e8ae4f90..0af52094 100644
--- a/crates/typst/src/visualize/color.rs
+++ b/crates/typst/src/visualize/color.rs
@@ -1947,7 +1947,7 @@ fn map() -> Module {
Module::new("map", scope)
}
-/// Defines a tradient preset as a series of colors expressed as u32s.
+/// Defines a gradient preset as a series of colors expressed as u32s.
macro_rules! preset {
($name:ident; $($colors:literal),* $(,)*) => {
fn $name() -> Array {
diff --git a/crates/typst/src/visualize/image/mod.rs b/crates/typst/src/visualize/image/mod.rs
index aeebb471..bb1b2b50 100644
--- a/crates/typst/src/visualize/image/mod.rs
+++ b/crates/typst/src/visualize/image/mod.rs
@@ -370,7 +370,7 @@ impl Image {
Ok(Self(Arc::new(LazyHash::new(Repr { kind, alt }))))
}
- /// Create a possibly font-dependant image from a buffer and a format.
+ /// Create a possibly font-dependent image from a buffer and a format.
#[comemo::memoize]
#[typst_macros::time(name = "load image")]
pub fn with_fonts(
diff --git a/crates/typst/src/visualize/shape.rs b/crates/typst/src/visualize/shape.rs
index 633872cc..56ecd029 100644
--- a/crates/typst/src/visualize/shape.rs
+++ b/crates/typst/src/visualize/shape.rs
@@ -51,7 +51,7 @@ pub struct RectElem {
/// - `{auto}` for a stroke of `{1pt + black}` if and if only if no fill is
/// given.
/// - Any kind of [stroke]
- /// - A dictionary describing the stroke for each side inidvidually. The
+ /// - A dictionary describing the stroke for each side individually. The
/// dictionary can contain the following keys in order of precedence:
/// - `top`: The top stroke.
/// - `right`: The right stroke.