diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-02 16:47:10 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-02 16:47:10 +0100 |
| commit | e9ff2d6463bf26cb0bbafb747bf8a77800687e3f (patch) | |
| tree | 810d28ba35557acacf987d08c2000e2e643cbe4e /library/src/math/align.rs | |
| parent | e6400861ab5c4d7ab437901b2334e5822c2693a5 (diff) | |
More robust automatic math spacing
Diffstat (limited to 'library/src/math/align.rs')
| -rw-r--r-- | library/src/math/align.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/library/src/math/align.rs b/library/src/math/align.rs index 82b461e9..e8a9c14a 100644 --- a/library/src/math/align.rs +++ b/library/src/math/align.rs @@ -29,8 +29,7 @@ pub(super) fn alignments(rows: &[MathRow]) -> Vec<Abs> { let count = rows .iter() .map(|row| { - row.0 - .iter() + row.iter() .filter(|fragment| matches!(fragment, MathFragment::Align)) .count() }) @@ -42,7 +41,7 @@ pub(super) fn alignments(rows: &[MathRow]) -> Vec<Abs> { for row in rows { let mut x = Abs::zero(); let mut i = 0; - for fragment in &row.0 { + for fragment in row.iter() { if matches!(fragment, MathFragment::Align) { if i < current { x = points[i]; |
