Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2024-09-26 13:32:55 -04:00 committed by GitHub
parent 3c90878460
commit ca1f749c08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
46 changed files with 62 additions and 62 deletions

View File

@ -49,7 +49,7 @@ jobs:
- run: cargo doc --workspace --no-deps
min-version:
name: Check mininum Rust version
name: Check minimum Rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@ -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()?;

View File

@ -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

View File

@ -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,
};

View File

@ -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.

View File

@ -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()
}

View File

@ -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();

View File

@ -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()
}

View File

@ -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;

View File

@ -675,7 +675,7 @@ impl<'a> TermItem<'a> {
}
node! {
/// A mathemathical equation: `$x$`, `$ x^2 $`.
/// A mathematical equation: `$x$`, `$ x^2 $`.
Equation
}

View File

@ -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;
}

View File

@ -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,

View File

@ -356,7 +356,7 @@ impl Func {
/// #show heading.where(level: 2): set text(blue)
/// = Section
/// == Subsection
/// === Sub-subection
/// === Sub-subsection
/// ```
#[func]
pub fn where_(

View File

@ -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 {

View File

@ -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))

View File

@ -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),

View File

@ -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),

View File

@ -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.
///

View File

@ -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))

View File

@ -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,

View File

@ -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),

View File

@ -140,7 +140,7 @@ pub struct EnumElem {
/// #set enum(numbering: "1.a)", full: true)
/// + Cook
/// + Heat water
/// + Add integredients
/// + Add ingredients
/// + Eat
/// ```
#[default(false)]

View File

@ -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(());
}

View File

@ -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 {

View File

@ -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(

View File

@ -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.

View File

@ -861,7 +861,7 @@ description: |
- Import autocompletion now only shows the latest package version until a
colon is typed
- Fixed autocompletion for dictionary key containing a space
- Fixed autocompletion for for loops
- Fixed autocompletion for `for` loops
- Command line interface
- Added `typst query` subcommand to execute a
@ -895,7 +895,7 @@ description: |
- Development
- Extracted parser and syntax tree into `typst-syntax` crate
- The `World::today` implementation of Typst dependants may need fixing if
- The `World::today` implementation of Typst dependents may need fixing if
they have the same [bug](https://github.com/typst/typst/issues/1842) that
the CLI world had
@ -1009,7 +1009,7 @@ description: |
path must contain `[{n}]` if the document has multiple pages.
- Added `--diagnostic-format=short` for Unix-style short diagnostics
- Doesn't emit color codes anymore if stderr isn't a TTY
- Now sets the correct exit when invoked with a non-existent file
- Now sets the correct exit when invoked with a nonexistent file
- Now ignores UTF-8 BOM in Typst files
- Miscellaneous Improvements

View File

@ -469,7 +469,7 @@ Aside from the official package repository, you might also want to check out the
compiles a curated list of resources created for Typst.
If you need to load functions and variables from another file within your
project, for example to use a template, you can use use the same
project, for example to use a template, you can use the same
[`{import}`]($scripting/#modules) statement with a file name rather than a
package specification. To instead include the textual content of another file,
you can use an [`{include}`]($scripting/#modules) statement. It will retrieve

View File

@ -188,7 +188,7 @@ conditionally remove the header on the first page:
This example may look intimidating, but let's break it down: By using the
`{context}` keyword, we are telling Typst that the header depends on where we
are in the document. We then ask Typst if the page [counter] is larger than one
at our (context-dependant) current position. The page counter starts at one, so
at our (context-dependent) current position. The page counter starts at one, so
we are skipping the header on a single page. Counters may have multiple levels.
This feature is used for items like headings, but the page counter will always
have a single level, so we can just look at the first one.

View File

@ -714,7 +714,7 @@ very first and last line.
align: center + horizon,
table.header[Technique][Advantage][Drawback],
[Diegetic], [Immersive], [May be contrived],
[Extradiegetic], [Breaks immersion], [Obstrusive],
[Extradiegetic], [Breaks immersion], [Obtrusive],
[Omitted], [Fosters engagement], [May fracture audience],
)
```
@ -746,7 +746,7 @@ below the first row:
>>> align: center + horizon,
>>> table.header[Technique][Advantage][Drawback],
>>> [Diegetic], [Immersive], [May be contrived],
>>> [Extradiegetic], [Breaks immersion], [Obstrusive],
>>> [Extradiegetic], [Breaks immersion], [Obtrusive],
>>> [Omitted], [Fosters engagement], [May fracture audience],
>>> )
```
@ -777,7 +777,7 @@ The next example shows how to draw all but the outer lines:
>>> align: center + horizon,
>>> table.header[Technique][Advantage][Drawback],
>>> [Diegetic], [Immersive], [May be contrived],
>>> [Extradiegetic], [Breaks immersion], [Obstrusive],
>>> [Extradiegetic], [Breaks immersion], [Obtrusive],
>>> [Omitted], [Fosters engagement], [May fracture audience],
>>> )
```
@ -812,7 +812,7 @@ calendar.
>>> align: center + horizon,
>>> table.header[Technique][Advantage][Drawback],
>>> [Diegetic], [Immersive], [May be contrived],
>>> [Extradiegetic], [Breaks immersion], [Obstrusive],
>>> [Extradiegetic], [Breaks immersion], [Obtrusive],
>>> [Omitted], [Fosters engagement], [May fracture audience],
>>> )
```

View File

@ -59,11 +59,11 @@ context is known. The body of a context expression may be evaluated zero, one,
or multiple times, depending on how many different places it is put into.
## Location context
Context can not only give us access to set rule values. It can also let us know
Context cannot only give us access to set rule values. It can also let us know
_where_ in the document we currently are, relative to other elements, and
absolutely on the pages. We can use this information to create very flexible
interactions between different document parts. This underpins features like
heading numbering, the table of contents, or page headers dependant on section
heading numbering, the table of contents, or page headers dependent on section
headings.
Some functions like [`counter.get`]($counter.get) implicitly access the current

View File

@ -90,7 +90,7 @@ struct Args {
/// This option controls where to spit them out. The HTML generation will
/// assume that this output directory is served at `${base_url}/assets/*`.
/// The default is `assets`. For example, if the base URL is `/docs/` then
/// the gemerated HTML might look like `<img src="/docs/assets/foo.png">`
/// the generated HTML might look like `<img src="/docs/assets/foo.png">`
/// even though the `--assets-dir` was set to `/tmp/images` or something.
#[arg(long, default_value = "assets")]
assets_dir: PathBuf,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -170,7 +170,7 @@
dict.nonfunc()
}
--- dict-dynamic-uplicate-key ---
--- dict-dynamic-duplicate-key ---
#let a = "hello"
#let b = "world"
#let c = "value"

View File

@ -212,7 +212,7 @@
#test(timesum("2:70"), "3:10")
#test(timesum("1:20, 2:10, 0:40"), "4:10")
--- stgring-replace ---
--- string-replace ---
// Test the `replace` method with `Str` replacements.
#test("ABC".replace("", "-"), "-A-B-C-")
#test("Ok".replace("Ok", "Nope", count: 0), "Ok")

View File

@ -191,7 +191,7 @@ Hello #box(width: 1em, height: 1em, clip: true)[#rect(width: 3em, height: 3em, f
world 2
--- block-clip-text ---
// Test cliping text
// Test clipping text
#block(width: 5em, height: 2em, clip: false, stroke: 1pt + black)[
But, soft! what light through
]

View File

@ -102,7 +102,7 @@ Lo que entendemos por nivel léxico-semántico, en cuanto su sentido más
gramatical: es aquel que estudia el origen y forma de las palabras de
un idioma.
--- hyphenate-es-captalized-names ---
--- hyphenate-es-capitalized-names ---
// If the hyphen is followed by a capitalized word we shall not repeat
// the hyphen at the next line
#set page(width: 6.2cm)

View File

@ -23,7 +23,7 @@ $ pi(a,b,) $
$ pi(a;b) $
--- math-call-2d-semicolon-priority ---
// If the semicolon directlry follows a hash expression, it terminates that
// If the semicolon directly follows a hash expression, it terminates that
// instead of indicating 2d arguments.
$ mat(#"math" ; "wins") $
$ mat(#"code"; "wins") $

View File

@ -63,7 +63,7 @@ Multiple trailing line breaks.
#hrule(70pt)$e^(pi i)+1 = 0$
--- math-linebreaking-lr ---
// LR groups prevent linbreaking.
// LR groups prevent linebreaking.
#let hrule(x) = box(line(length: x))
#hrule(76pt)$a+b$\
#hrule(74pt)$(a+b)$\

View File

@ -12,7 +12,7 @@ hello_world Nutzer*innen
日本語では、*太字*_斜体_を使って強調します。
中文中混有*Strong*_Empasis_。
中文中混有*Strong*_Emphasis_。
// Can contain paragraph in nested content block.
_Still #[

View File

@ -75,6 +75,6 @@ Not in heading
--- heading-numbering-hint ---
= Heading <intro>
// Error: 1:20-1:26 cannot reference heading without numbering
// Hint: 1:20-1:26 you can enable heading numbering with `#set heading(numbering: "1.")`
Can not be used as @intro
// Error: 1:19-1:25 cannot reference heading without numbering
// Hint: 1:19-1:25 you can enable heading numbering with `#set heading(numbering: "1.")`
Cannot be used as @intro

View File

@ -19,7 +19,7 @@ Hello *#x*
- No more fruit
--- set-text-override ---
// Test that that block spacing and text style are respected from
// Test that block spacing and text style are respected from
// the outside, but the more specific fill is respected.
#set par(spacing: 4pt)
#set text(style: "italic", fill: eastern)

View File

@ -67,12 +67,12 @@ Emoji: 🐪, 🌋, 🏞
--- text-unknown-font-family-warning ---
#text(font: "linux libertine", "I exist, ")
// Warning: 13-27 unknown font family: non-existing
#text(font: "non-existing", "but")
// Warning: 17-36 unknown font family: also-non-existing
#set text(font: "also-non-existing")
// Warning: 13-26 unknown font family: nonexistent
#text(font: "nonexistent", "but")
// Warning: 17-35 unknown font family: also-nonexistent
#set text(font: "also-nonexistent")
I
// Warning: 23-56 unknown font family: list-of
// Warning: 23-56 unknown font family: non-existing-fonts
#let var = text(font: ("list-of", "non-existing-fonts"))[don't]
// Warning: 23-55 unknown font family: list-of
// Warning: 23-55 unknown font family: nonexistent-fonts
#let var = text(font: ("list-of", "nonexistent-fonts"))[don't]
#var

View File

@ -1,4 +1,4 @@
// Test sub- and superscipt shifts.
// Test sub- and superscript shifts.
--- sub-super ---
#table(

View File

@ -371,7 +371,7 @@ class TestHelper {
);
}
// Confgiures whether the run and save buttons are enabled.
// Configures whether the run and save buttons are enabled.
private setRunButtonEnabled(enabled: boolean) {
vscode.commands.executeCommand(
"setContext",