mirror of
https://github.com/typst/typst
synced 2025-05-13 12:36:23 +08:00
Formatting fixes
This commit is contained in:
parent
6f7e8dd497
commit
815ee3254c
@ -70,13 +70,13 @@ impl HNode {
|
||||
|
||||
impl HNode {
|
||||
/// Normal strong spacing.
|
||||
pub fn strong(amount: Spacing) -> Self {
|
||||
Self { amount, weak: false }
|
||||
pub fn strong(amount: impl Into<Spacing>) -> Self {
|
||||
Self { amount: amount.into(), weak: false }
|
||||
}
|
||||
|
||||
/// User-created weak spacing.
|
||||
pub fn weak(amount: Spacing) -> Self {
|
||||
Self { amount, weak: true }
|
||||
pub fn weak(amount: impl Into<Spacing>) -> Self {
|
||||
Self { amount: amount.into(), weak: true }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ impl Align {
|
||||
}
|
||||
|
||||
/// Returns the position of this alignment in a container with the given
|
||||
/// extentq.
|
||||
/// extent.
|
||||
pub fn position(self, extent: Abs) -> Abs {
|
||||
match self {
|
||||
Self::Left | Self::Top => Abs::zero(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user