From e9ff2d6463bf26cb0bbafb747bf8a77800687e3f Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 2 Feb 2023 16:47:10 +0100 Subject: More robust automatic math spacing --- library/src/math/align.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'library/src/math/align.rs') 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 { 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 { 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]; -- cgit v1.2.3