diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-14 14:59:16 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-14 14:59:16 +0200 |
| commit | de902d8775992a6d7a2168964de8e2db336504c4 (patch) | |
| tree | d8d734b1226c0819e9eb5f603b65235068ac17d9 /crates | |
| parent | f15b81e9a702be791d72d115cf8696020748cd7b (diff) | |
Minor docs fixes
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/text/deco.rs | 8 | ||||
| -rw-r--r-- | crates/typst/src/eval/func.rs | 6 | ||||
| -rw-r--r-- | crates/typst/src/geom/stroke.rs | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/crates/typst-library/src/text/deco.rs b/crates/typst-library/src/text/deco.rs index e34bf363..4f85abef 100644 --- a/crates/typst-library/src/text/deco.rs +++ b/crates/typst-library/src/text/deco.rs @@ -243,9 +243,7 @@ pub struct HighlightElem { #[default(Color::Rgba(RgbaColor::new(0xFF, 0xFF, 0x5F, 0xFF)).into())] pub fill: Paint, - /// The top end of the background rectangle. Note that top edge will update - /// to be always higher than the glyph's bounding box. - /// (default: "ascender") + /// The top end of the background rectangle. /// /// ```example /// #set highlight(top-edge: "ascender") @@ -257,9 +255,7 @@ pub struct HighlightElem { #[default(TopEdge::Metric(TopEdgeMetric::Ascender))] pub top_edge: TopEdge, - /// The bottom end of the background rectangle. Note that top edge will update - /// to be always lower than the glyph's bounding box. - /// (default: "descender") + /// The bottom end of the background rectangle. /// /// ```example /// #set highlight(bottom-edge: "descender") diff --git a/crates/typst/src/eval/func.rs b/crates/typst/src/eval/func.rs index 45a1efbd..fcde26d7 100644 --- a/crates/typst/src/eval/func.rs +++ b/crates/typst/src/eval/func.rs @@ -333,7 +333,8 @@ impl Func { args: Args, /// The arguments to apply to the function. #[external] - arguments: Args, + #[variadic] + arguments: Vec<Args>, ) -> Func { let span = self.span; Self { repr: Repr::With(Arc::new((self, args))), span } @@ -348,8 +349,9 @@ impl Func { /// The docs argument cannot be called `args`. args: Args, /// The fields to filter for. + #[variadic] #[external] - fields: Args, + fields: Vec<Args>, ) -> StrResult<Selector> { let mut args = args; let fields = args.to_named(); diff --git a/crates/typst/src/geom/stroke.rs b/crates/typst/src/geom/stroke.rs index 820f4f44..893ac2eb 100644 --- a/crates/typst/src/geom/stroke.rs +++ b/crates/typst/src/geom/stroke.rs @@ -64,8 +64,8 @@ use super::*; /// /// # Fields /// On a `stroke` object, you can access any of the fields mentioned in the -/// dictionary format above. For example, `{(2pt + blue).thickness}` is `{2pt}`, -/// `{(2pt + blue).miter-limit}` is `{4.0}` (the default), and so on. +/// dictionary format above. For example, `{(2pt + blue).thickness}` is `{2pt}`. +/// Meanwhile, `{(2pt + blue).cap}` is `{auto}` because it's unspecified. #[ty] #[derive(Default, Clone, Eq, PartialEq, Hash)] pub struct Stroke<T: Numeric = Length> { |
