summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst-pdf/src/gradient.rs2
-rw-r--r--crates/typst-syntax/src/ast.rs2
-rw-r--r--crates/typst-syntax/src/node.rs2
-rw-r--r--crates/typst-utils/src/hash.rs4
-rw-r--r--crates/typst/src/introspection/locator.rs2
-rw-r--r--crates/typst/src/layout/grid/mod.rs2
-rw-r--r--crates/typst/src/layout/inline/line.rs2
-rw-r--r--crates/typst/src/layout/inline/linebreak.rs24
-rw-r--r--crates/typst/src/model/par.rs2
-rw-r--r--crates/typst/src/model/table.rs6
-rw-r--r--crates/typst/src/text/shift.rs2
-rw-r--r--tests/src/logger.rs2
-rw-r--r--tests/suite/layout/measure.typ2
-rw-r--r--tests/suite/model/ref.typ2
-rw-r--r--tools/test-helper/src/extension.ts2
15 files changed, 29 insertions, 29 deletions
diff --git a/crates/typst-pdf/src/gradient.rs b/crates/typst-pdf/src/gradient.rs
index 5f85f9ca..81dc2748 100644
--- a/crates/typst-pdf/src/gradient.rs
+++ b/crates/typst-pdf/src/gradient.rs
@@ -223,7 +223,7 @@ fn shading_function(
function
}
-/// Writes an expontential function that expresses a single segment (between two
+/// Writes an exponential function that expresses a single segment (between two
/// stops) of a gradient.
fn single_gradient(
chunk: &mut PdfChunk,
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs
index 3d3a85ad..5fbd1142 100644
--- a/crates/typst-syntax/src/ast.rs
+++ b/crates/typst-syntax/src/ast.rs
@@ -1443,7 +1443,7 @@ pub enum BinOp {
NotIn,
/// The add-assign operator: `+=`.
AddAssign,
- /// The subtract-assign oeprator: `-=`.
+ /// The subtract-assign operator: `-=`.
SubAssign,
/// The multiply-assign operator: `*=`.
MulAssign,
diff --git a/crates/typst-syntax/src/node.rs b/crates/typst-syntax/src/node.rs
index bc378e66..a3487e45 100644
--- a/crates/typst-syntax/src/node.rs
+++ b/crates/typst-syntax/src/node.rs
@@ -824,7 +824,7 @@ pub enum Side {
After,
}
-/// Access to leafs.
+/// Access to leaves.
impl<'a> LinkedNode<'a> {
/// Get the rightmost non-trivia leaf before this node.
pub fn prev_leaf(&self) -> Option<Self> {
diff --git a/crates/typst-utils/src/hash.rs b/crates/typst-utils/src/hash.rs
index dabae24c..3dbadbe2 100644
--- a/crates/typst-utils/src/hash.rs
+++ b/crates/typst-utils/src/hash.rs
@@ -16,8 +16,8 @@ use siphasher::sip128::{Hasher128, SipHasher13};
/// Note that for a value `v` of type `T`, `hash(v)` is not necessarily equal to
/// `hash(LazyHash::new(v))`. Writing the precomputed hash into a hasher's
/// state produces different output than writing the value's parts directly.
-/// However, that seldomly matters as you are typically either dealing with
-/// values of type `T` or with values of type `LazyHash<T>`, not a mix of both.
+/// However, that seldom matters as you are typically either dealing with values
+/// of type `T` or with values of type `LazyHash<T>`, not a mix of both.
///
/// # Equality
/// Because Typst uses high-quality 128 bit hashes in all places, the risk of a
diff --git a/crates/typst/src/introspection/locator.rs b/crates/typst/src/introspection/locator.rs
index 4df94a2c..e6a707e9 100644
--- a/crates/typst/src/introspection/locator.rs
+++ b/crates/typst/src/introspection/locator.rs
@@ -95,7 +95,7 @@ use crate::introspection::{Introspector, Location};
/// that layer upfront and then start forking out. The final remaining
/// question is how we can compactly encode this information: For this, as
/// always, we use hashing! We incorporate the ID information from each layer
-/// into a single hash and thanks to the collision resistence of 128-bit
+/// into a single hash and thanks to the collision resistance of 128-bit
/// SipHash, we get almost guaranteed unique locations. We don't even store
/// the full layer information at all, but rather hash _hierarchically:_ Let
/// `k_x` be our local per-layer ID for layer `x` and `h_x` be the full
diff --git a/crates/typst/src/layout/grid/mod.rs b/crates/typst/src/layout/grid/mod.rs
index 08257a5c..d4798305 100644
--- a/crates/typst/src/layout/grid/mod.rs
+++ b/crates/typst/src/layout/grid/mod.rs
@@ -45,7 +45,7 @@ use crate::visualize::{Paint, Stroke};
/// intended for presentational and layout purposes, while the
/// [`{table}`]($table) element is intended for, in broad terms, presenting
/// multiple related data points. In the future, Typst will annotate its output
-/// such that screenreaders will annouce content in `table` as tabular while a
+/// such that screenreaders will announce content in `table` as tabular while a
/// grid's content will be announced no different than multiple content blocks
/// in the document flow. Set and show rules on one of these elements do not
/// affect the other.
diff --git a/crates/typst/src/layout/inline/line.rs b/crates/typst/src/layout/inline/line.rs
index bf1662ce..d9218e82 100644
--- a/crates/typst/src/layout/inline/line.rs
+++ b/crates/typst/src/layout/inline/line.rs
@@ -256,7 +256,7 @@ where
}
}
-/// Collects / reshapes all items for the given `subrange` with continous
+/// Collects / reshapes all items for the given `subrange` with continuous
/// direction.
fn collect_range<'a>(
engine: &Engine,
diff --git a/crates/typst/src/layout/inline/linebreak.rs b/crates/typst/src/layout/inline/linebreak.rs
index defb5f81..7df65609 100644
--- a/crates/typst/src/layout/inline/linebreak.rs
+++ b/crates/typst/src/layout/inline/linebreak.rs
@@ -348,7 +348,7 @@ fn linebreak_optimized_bounded<'a>(
/// Runs the normal Knuth-Plass algorithm, but instead of building proper lines
/// (which is costly) to determine costs, it determines approximate costs using
-/// cummulative arrays.
+/// cumulative arrays.
///
/// This results in a likely good paragraph layouts, for which we then compute
/// the exact cost. This cost is an upper bound for proper optimized
@@ -360,7 +360,7 @@ fn linebreak_optimized_approximate(
width: Abs,
metrics: &CostMetrics,
) -> Cost {
- // Determine the cummulative estimation metrics.
+ // Determine the cumulative estimation metrics.
let estimates = Estimates::compute(p);
/// An entry in the dynamic programming table for paragraph optimization.
@@ -872,10 +872,10 @@ impl CostMetrics {
/// Allows to get a quick estimate of a metric for a line between two byte
/// positions.
struct Estimates {
- widths: CummulativeVec<Abs>,
- stretchability: CummulativeVec<Abs>,
- shrinkability: CummulativeVec<Abs>,
- justifiables: CummulativeVec<usize>,
+ widths: CumulativeVec<Abs>,
+ stretchability: CumulativeVec<Abs>,
+ shrinkability: CumulativeVec<Abs>,
+ justifiables: CumulativeVec<usize>,
}
impl Estimates {
@@ -883,10 +883,10 @@ impl Estimates {
fn compute(p: &Preparation) -> Self {
let cap = p.text.len();
- let mut widths = CummulativeVec::with_capacity(cap);
- let mut stretchability = CummulativeVec::with_capacity(cap);
- let mut shrinkability = CummulativeVec::with_capacity(cap);
- let mut justifiables = CummulativeVec::with_capacity(cap);
+ let mut widths = CumulativeVec::with_capacity(cap);
+ let mut stretchability = CumulativeVec::with_capacity(cap);
+ let mut shrinkability = CumulativeVec::with_capacity(cap);
+ let mut justifiables = CumulativeVec::with_capacity(cap);
for (range, item) in p.items.iter() {
if let Item::Text(shaped) = item {
@@ -919,12 +919,12 @@ impl Estimates {
}
/// An accumulative array of a metric.
-struct CummulativeVec<T> {
+struct CumulativeVec<T> {
total: T,
summed: Vec<T>,
}
-impl<T> CummulativeVec<T>
+impl<T> CumulativeVec<T>
where
T: Default + Copy + Add<Output = T> + Sub<Output = T>,
{
diff --git a/crates/typst/src/model/par.rs b/crates/typst/src/model/par.rs
index dc41297a..25e56332 100644
--- a/crates/typst/src/model/par.rs
+++ b/crates/typst/src/model/par.rs
@@ -123,7 +123,7 @@ pub struct ParElem {
#[resolve]
pub hanging_indent: Length,
- /// Indicates wheter an overflowing line should be shrunk.
+ /// Indicates whether an overflowing line should be shrunk.
///
/// This property is set to `false` on raw blocks, because shrinking a line
/// could visually break the indentation.
diff --git a/crates/typst/src/model/table.rs b/crates/typst/src/model/table.rs
index da7b6082..02c2f0d4 100644
--- a/crates/typst/src/model/table.rs
+++ b/crates/typst/src/model/table.rs
@@ -39,9 +39,9 @@ use crate::visualize::{Paint, Stroke};
/// your presentation by arranging unrelated content in a grid. In the former
/// case, a table is the right choice, while in the latter case, a grid is more
/// appropriate. Furthermore, Typst will annotate its output in the future such
-/// that screenreaders will annouce content in `table` as tabular while a grid's
-/// content will be announced no different than multiple content blocks in the
-/// document flow.
+/// that screenreaders will announce content in `table` as tabular while a
+/// grid's content will be announced no different than multiple content blocks
+/// in the document flow.
///
/// Note that, to override a particular cell's properties or apply show rules on
/// table cells, you can use the [`table.cell`]($table.cell) element. See its
diff --git a/crates/typst/src/text/shift.rs b/crates/typst/src/text/shift.rs
index 2dbfd2b6..0029a303 100644
--- a/crates/typst/src/text/shift.rs
+++ b/crates/typst/src/text/shift.rs
@@ -128,7 +128,7 @@ impl Show for Packed<SuperElem> {
}
/// Find and transform the text contained in `content` to the given script kind
-/// if and only if it only consists of `Text`, `Space`, and `Empty` leafs.
+/// if and only if it only consists of `Text`, `Space`, and `Empty` leaves.
fn search_text(content: &Content, sub: bool) -> Option<EcoString> {
if content.is::<SpaceElem>() {
Some(' '.into())
diff --git a/tests/src/logger.rs b/tests/src/logger.rs
index 1acf7c14..b6b44848 100644
--- a/tests/src/logger.rs
+++ b/tests/src/logger.rs
@@ -89,7 +89,7 @@ impl<'a> Logger<'a> {
let Self { selected, passed, failed, skipped, .. } = *self;
eprintln!("{passed} passed, {failed} failed, {skipped} skipped");
- assert_eq!(selected, passed + failed, "not all tests were executed succesfully");
+ assert_eq!(selected, passed + failed, "not all tests were executed successfully");
if self.mismatched_image {
eprintln!(" pass the --update flag to update the reference images");
diff --git a/tests/suite/layout/measure.typ b/tests/suite/layout/measure.typ
index 71a6b32a..5429c611 100644
--- a/tests/suite/layout/measure.typ
+++ b/tests/suite/layout/measure.typ
@@ -24,7 +24,7 @@
--- measure-counter-width ---
// Measure a counter. Tests that the introspector-assisted location assignment
// is able to take `here()` from the context into account to find the closest
-// matching element instaed of any single one. Crucially, we need to reuse
+// matching element instead of any single one. Crucially, we need to reuse
// the same `context c.display()` to get the same span, hence `it`.
#let f(it) = context [
Is #measure(it).width wide: #it \
diff --git a/tests/suite/model/ref.typ b/tests/suite/model/ref.typ
index d0881202..cc6d6bf1 100644
--- a/tests/suite/model/ref.typ
+++ b/tests/suite/model/ref.typ
@@ -47,7 +47,7 @@ $ A = 1 $ <eq2>
#set ref(supplement: none)
@fig1, @fig2, @eq1, @eq2
---- ref-ambigious ---
+--- ref-ambiguous ---
// Test ambiguous reference.
= Introduction <arrgh>
diff --git a/tools/test-helper/src/extension.ts b/tools/test-helper/src/extension.ts
index 15d4197a..8d8a155f 100644
--- a/tools/test-helper/src/extension.ts
+++ b/tools/test-helper/src/extension.ts
@@ -24,7 +24,7 @@ class TestHelper {
// The current zoom scale.
scale = 1.0;
- // The extention's status bar item.
+ // The extension's status bar item.
statusItem: vscode.StatusBarItem;
// The active message of the status item.