diff --git a/crates/typst-library/src/visualize/curve.rs b/crates/typst-library/src/visualize/curve.rs
index 9f4a21a4e..b53995464 100644
--- a/crates/typst-library/src/visualize/curve.rs
+++ b/crates/typst-library/src/visualize/curve.rs
@@ -72,7 +72,7 @@ pub struct CurveElem {
/// How to [stroke] the curve. This can be:
///
/// Can be set to `{none}` to disable the stroke or to `{auto}` for a
- /// stroke of `{1pt}` black if and if only if no fill is given.
+ /// stroke of `{1pt}` black if and only if no fill is given.
///
/// ```example
/// #let down = curve.line((40pt, 40pt), relative: true)
diff --git a/crates/typst-library/src/visualize/path.rs b/crates/typst-library/src/visualize/path.rs
index 46ea7ec32..49ec5f176 100644
--- a/crates/typst-library/src/visualize/path.rs
+++ b/crates/typst-library/src/visualize/path.rs
@@ -50,7 +50,7 @@ pub struct PathElem {
/// How to [stroke] the path. This can be:
///
/// Can be set to `{none}` to disable the stroke or to `{auto}` for a
- /// stroke of `{1pt}` black if and if only if no fill is given.
+ /// stroke of `{1pt}` black if and only if no fill is given.
#[fold]
pub stroke: Smart