summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMALO <57839069+MDLC01@users.noreply.github.com>2023-11-02 11:01:46 +0100
committerGitHub <noreply@github.com>2023-11-02 11:01:46 +0100
commit51d9fe2d0214c4d2bace9396f022c666542c7970 (patch)
tree837ff2c8e0e762260f5b8be26f79a32aa4c00f2c
parentc47757d6d41b047f68bc25fec7ded8e1c552a2c5 (diff)
Documentation fixes (#2543)
-rw-r--r--crates/typst-library/src/text/quote.rs2
-rw-r--r--crates/typst/src/eval/dict.rs1
-rw-r--r--crates/typst/src/geom/color.rs4
-rw-r--r--crates/typst/src/geom/gradient.rs16
-rw-r--r--docs/changelog.md2
5 files changed, 13 insertions, 12 deletions
diff --git a/crates/typst-library/src/text/quote.rs b/crates/typst-library/src/text/quote.rs
index d42dc2f2..86be2416 100644
--- a/crates/typst-library/src/text/quote.rs
+++ b/crates/typst-library/src/text/quote.rs
@@ -55,7 +55,7 @@ pub struct QuoteElem {
/// - `{false}`: Do not wrap this quote in double quotes.
/// - `{auto}`: Infer whether to wrap this quote in double quotes based on
/// the `block` property. If `block` is `{false}`, double quotes are
- /// auomatically added.
+ /// automatically added.
///
/// ```example
/// #set text(lang: "de")
diff --git a/crates/typst/src/eval/dict.rs b/crates/typst/src/eval/dict.rs
index b77686fe..1cc675c6 100644
--- a/crates/typst/src/eval/dict.rs
+++ b/crates/typst/src/eval/dict.rs
@@ -171,6 +171,7 @@ impl Dict {
#[func]
pub fn remove(
&mut self,
+ /// The key of the pair to remove.
key: Str,
/// A default value to return if the key does not exist.
#[named]
diff --git a/crates/typst/src/geom/color.rs b/crates/typst/src/geom/color.rs
index 79615fee..bf04408c 100644
--- a/crates/typst/src/geom/color.rs
+++ b/crates/typst/src/geom/color.rs
@@ -117,8 +117,8 @@ const ANGLE_EPSILON: f32 = 1e-5;
/// Some popular presets are not included because they are not available under a
/// free licence. Others, like
/// [Jet](https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/),
-/// are not included because they are not not color blind friendly. Feel free to
-/// use or create a package with other presets that are useful to you!
+/// are not included because they are not color blind friendly. Feel free to use
+/// or create a package with other presets that are useful to you!
///
/// ```preview
/// #set page(width: auto, height: auto)
diff --git a/crates/typst/src/geom/gradient.rs b/crates/typst/src/geom/gradient.rs
index 2db484a3..8a10ed2b 100644
--- a/crates/typst/src/geom/gradient.rs
+++ b/crates/typst/src/geom/gradient.rs
@@ -71,10 +71,10 @@ use crate::syntax::{Span, Spanned};
/// # Relativeness
/// The location of the `{0%}` and `{100%}` stops is dependant on the dimensions
/// of a container. This container can either be the shape they are painted on,
-/// or to the closest surrounding container. This is controlled by the
-/// `relative` argument of a gradient constructor. By default, gradients are
-/// relative to the shape they are painted on, unless the gradient is applied on
-/// text, in which case they are relative to the closest ancestor container.
+/// or the closest surrounding container. This is controlled by the `relative`
+/// argument of a gradient constructor. By default, gradients are relative to
+/// the shape they are painted on, unless the gradient is applied on text, in
+/// which case they are relative to the closest ancestor container.
///
/// Typst determines the ancestor container as follows:
/// - For shapes that are placed at the root/top level of the document, the
@@ -137,9 +137,9 @@ use crate::syntax::{Span, Spanned};
///
/// # Direction
/// Some gradients are sensitive to direction. For example, a linear gradient
-/// has an angle that determines the its direction. Typst uses a clockwise
-/// angle, with 0° being from left-to-right, 90° from top-to-bottom, 180° from
-/// right-to-left, and 270° from bottom-to-top.
+/// has an angle that determines its direction. Typst uses a clockwise angle,
+/// with 0° being from left to right, 90° from top to bottom, 180° from right to
+/// left, and 270° from bottom to top.
///
/// ```example
/// >>> #set square(size: 50pt)
@@ -252,7 +252,7 @@ impl Gradient {
///
/// Using these four values, also called the focal point for the starting
/// circle and the center and radius for the end circle, we can define a
- /// gradient with more interesting properties than a basic radial gradient:
+ /// gradient with more interesting properties than a basic radial gradient.
///
/// ```example
/// >>> #set circle(radius: 30pt)
diff --git a/docs/changelog.md b/docs/changelog.md
index 55fe622e..2635742e 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -173,7 +173,7 @@ description: |
mode when before a digit. This improves, in particular, how negative integer
values are displayed in math mode.
- Added support for specifying a default value instead of failing for
- [`remove`] function in [array]($array.remove) and
+ `remove` function in [array]($array.remove) and
[dictionary]($dictionary.remove)
- Simplified page setup guide examples
- Switched the documentation from using the word "hashtag" to the word "hash"