Fix incorrect comment in the "ascii" line breaker

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
This commit is contained in:
Simon Hausmann 2022-03-07 19:02:01 +01:00 committed by Simon Hausmann
parent aee3ffca27
commit 004a09b64d

View file

@ -21,7 +21,7 @@ impl<'a> Iterator for LineBreakIterator<'a> {
while let Some((byte_offset, char)) = self.it.next() {
let maybe_opportunity = match char {
'\u{2028}' | '\u{2029}' => Some(BreakOpportunity::Mandatory), // unicode line- and paragraph separators
'\n' => Some(BreakOpportunity::Mandatory), // unicode line- and paragraph separators
'\n' => Some(BreakOpportunity::Mandatory), // ascii line break
_ if self.last_ch.map_or(false, |c| c.is_ascii_whitespace()) => {
Some(BreakOpportunity::Allowed)
}