mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
refactor: rename leading to a more appropriate name
This commit is contained in:
parent
112ae858ea
commit
11c2049ddb
@ -259,12 +259,11 @@ impl Show for Packed<EnumElem> {
|
|||||||
.spanned(self.span());
|
.spanned(self.span());
|
||||||
|
|
||||||
if tight {
|
if tight {
|
||||||
let leading = self
|
let spacing = self
|
||||||
.spacing(styles)
|
.spacing(styles)
|
||||||
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
||||||
let spacing =
|
let v = VElem::new(spacing.into()).with_weak(true).with_attach(true).pack();
|
||||||
VElem::new(leading.into()).with_weak(true).with_attach(true).pack();
|
realized = v + realized;
|
||||||
realized = spacing + realized;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(realized)
|
Ok(realized)
|
||||||
|
@ -166,12 +166,11 @@ impl Show for Packed<ListElem> {
|
|||||||
.spanned(self.span());
|
.spanned(self.span());
|
||||||
|
|
||||||
if tight {
|
if tight {
|
||||||
let leading = self
|
let spacing = self
|
||||||
.spacing(styles)
|
.spacing(styles)
|
||||||
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
||||||
let spacing =
|
let v = VElem::new(spacing.into()).with_weak(true).with_attach(true).pack();
|
||||||
VElem::new(leading.into()).with_weak(true).with_attach(true).pack();
|
realized = v + realized;
|
||||||
realized = spacing + realized;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(realized)
|
Ok(realized)
|
||||||
|
@ -189,15 +189,15 @@ impl Show for Packed<TermsElem> {
|
|||||||
.styled(TermsElem::set_within(true));
|
.styled(TermsElem::set_within(true));
|
||||||
|
|
||||||
if tight {
|
if tight {
|
||||||
let leading = self
|
let spacing = self
|
||||||
.spacing(styles)
|
.spacing(styles)
|
||||||
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
.unwrap_or_else(|| ParElem::leading_in(styles).into());
|
||||||
let spacing = VElem::new(leading.into())
|
let v = VElem::new(spacing.into())
|
||||||
.with_weak(true)
|
.with_weak(true)
|
||||||
.with_attach(true)
|
.with_attach(true)
|
||||||
.pack()
|
.pack()
|
||||||
.spanned(span);
|
.spanned(span);
|
||||||
realized = spacing + realized;
|
realized = v + realized;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(realized)
|
Ok(realized)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user