mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix naming convention
This commit is contained in:
parent
69d0d9e26d
commit
c8d45148f1
@ -478,7 +478,6 @@ pub fn commit(
|
|||||||
if remaining < Abs::zero() && shrinkability > Abs::zero() {
|
if remaining < Abs::zero() && shrinkability > Abs::zero() {
|
||||||
// Attempt to reduce the length of the line, using shrinkability.
|
// Attempt to reduce the length of the line, using shrinkability.
|
||||||
justification_ratio = (remaining / shrinkability).max(-1.0);
|
justification_ratio = (remaining / shrinkability).max(-1.0);
|
||||||
|
|
||||||
remaining = (remaining + shrinkability).min(Abs::zero());
|
remaining = (remaining + shrinkability).min(Abs::zero());
|
||||||
} else if line.justify && fr.is_zero() {
|
} else if line.justify && fr.is_zero() {
|
||||||
// Attempt to increase the length of the line, using stretchability.
|
// Attempt to increase the length of the line, using stretchability.
|
||||||
|
@ -244,9 +244,9 @@ cast! {
|
|||||||
Microtype,
|
Microtype,
|
||||||
self => Value::Dict(self.into()),
|
self => Value::Dict(self.into()),
|
||||||
mut dict: Dict => {
|
mut dict: Dict => {
|
||||||
let max_retract = dict.take("max_retract")?.cast()?;
|
let max_retract = dict.take("max-retract")?.cast()?;
|
||||||
let max_expand = dict.take("max_expand")?.cast()?;
|
let max_expand = dict.take("max-expand")?.cast()?;
|
||||||
dict.finish(&["max_retract", "max_expand"])?;
|
dict.finish(&["max-retract", "max-expand"])?;
|
||||||
Self { max_retract, max_expand }
|
Self { max_retract, max_expand }
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -254,8 +254,8 @@ cast! {
|
|||||||
impl From<Microtype> for Dict {
|
impl From<Microtype> for Dict {
|
||||||
fn from(microtype: Microtype) -> Self {
|
fn from(microtype: Microtype) -> Self {
|
||||||
dict! {
|
dict! {
|
||||||
"max_retract" => microtype.max_retract,
|
"max-retract" => microtype.max_retract,
|
||||||
"max_expand" => microtype.max_expand,
|
"max-expand" => microtype.max_expand,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user