diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-05 16:06:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-05 16:06:25 +0200 |
| commit | 93eaafb236bba73cd72c8cd142279366b8afa0be (patch) | |
| tree | 47aa6648fc1b42edcef0936c55fda9506aa9fb7e /src/library/font.rs | |
| parent | fa3e2920c0be01874ba40eebc87ed30f97cdeec7 (diff) | |
Tidy up align function 🧺
Diffstat (limited to 'src/library/font.rs')
| -rw-r--r-- | src/library/font.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/font.rs b/src/library/font.rs index 60380def..21fb2d13 100644 --- a/src/library/font.rs +++ b/src/library/font.rs @@ -51,7 +51,7 @@ use crate::prelude::*; /// ``` pub async fn font(mut args: Args, ctx: &mut LayoutContext) -> Value { let mut text = ctx.state.text.clone(); - let mut needs_flatten = false; + let mut needs_flattening = false; let body = args.find::<SynTree>(); @@ -67,7 +67,7 @@ pub async fn font(mut args: Args, ctx: &mut LayoutContext) -> Value { let list: Vec<_> = args.find_all::<StringLike>().map(|s| s.to_lowercase()).collect(); if !list.is_empty() { text.fallback.list = list; - needs_flatten = true; + needs_flattening = true; } if let Some(style) = args.get::<_, FontStyle>(ctx, "style") { @@ -89,12 +89,12 @@ pub async fn font(mut args: Args, ctx: &mut LayoutContext) -> Value { .collect(); text.fallback.update_class_list(class, fallback); - needs_flatten = true; + needs_flattening = true; } args.done(ctx); - if needs_flatten { + if needs_flattening { text.fallback.flatten(); } |
