Skip to content
Snippets Groups Projects
Commit 8d8a6e92 authored by Gino Valente's avatar Gino Valente
Browse files

Fixed some lines not being trimmed

parent 49fa1c26
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,7 @@ impl KayakFont { ...@@ -147,7 +147,7 @@ impl KayakFont {
for (index, word) in words.iter().enumerate() { for (index, word) in words.iter().enumerate() {
// Check if this is the last word of the line. // Check if this is the last word of the line.
let will_break = break_index.map(|idx| index + 1 == idx).unwrap_or_default(); let mut will_break = break_index.map(|idx| index + 1 == idx).unwrap_or_default();
// === Line Break === // // === Line Break === //
// If the `break_index` is set, see if it applies. // If the `break_index` is set, see if it applies.
...@@ -168,6 +168,7 @@ impl KayakFont { ...@@ -168,6 +168,7 @@ impl KayakFont {
let (next_break, next_skip) = self.find_next_break(index, line.width, properties, &words); let (next_break, next_skip) = self.find_next_break(index, line.width, properties, &words);
break_index = next_break; break_index = next_break;
skip_until_index = next_skip; skip_until_index = next_skip;
will_break |= break_index.map(|idx| index + 1 == idx).unwrap_or_default();
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment