summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-09-14 14:59:16 +0200
committerLaurenz <laurmaedje@gmail.com>2023-09-14 14:59:16 +0200
commitde902d8775992a6d7a2168964de8e2db336504c4 (patch)
treed8d734b1226c0819e9eb5f603b65235068ac17d9
parentf15b81e9a702be791d72d115cf8696020748cd7b (diff)
Minor docs fixes
-rw-r--r--crates/typst-library/src/text/deco.rs8
-rw-r--r--crates/typst/src/eval/func.rs6
-rw-r--r--crates/typst/src/geom/stroke.rs4
-rw-r--r--docs/changelog.md3
4 files changed, 10 insertions, 11 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> {
diff --git a/docs/changelog.md b/docs/changelog.md
index 8c14ce96..4f83b588 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -7,7 +7,8 @@ description: |
# Changelog
## Version 0.8.0 (September 13, 2023) { #v0.8.0 }
- Scripting
- - Plugins (thanks to [@astrale-sharp](https://github.com/astrale-sharp))
+ - Plugins (thanks to [@astrale-sharp](https://github.com/astrale-sharp) and
+ [@arnaudgolfouse](https://github.com/arnaudgolfouse))
- Typst can now load [plugins]($plugin) that are compiled to WebAssembly
- Anything that can be compiled to WebAssembly can thus be loaded as a
plugin