diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/library/text/par.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/library/text/par.rs b/src/library/text/par.rs index d740df03..cf7dc4a9 100644 --- a/src/library/text/par.rs +++ b/src/library/text/par.rs @@ -824,6 +824,19 @@ fn line<'a>( mandatory: bool, hyphen: bool, ) -> Line<'a> { + if range.is_empty() { + return Line { + bidi: &p.bidi, + range, + first: None, + items: &[], + last: None, + width: Length::zero(), + mandatory, + dash: false, + }; + } + // Find the last item. let (last_idx, last_offset) = p.find_idx_and_offset(range.end.saturating_sub(1)).unwrap(); |
