diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 8c86b8fae93..a888378bf19 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -499,7 +499,7 @@ impl LineBreaker { debug!("LineBreaker: Deferring the fragment to the inline_end of the new-line \ character to the line."); let mut inline_end = split_fragment(inline_end); - inline_end.new_line_pos = in_fragment.new_line_pos.clone(); + inline_end.new_line_pos.remove(0); self.work_list.push_front(inline_end); } false diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 7d9a8631935..90193fbdf8b 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -95,6 +95,7 @@ experimental == vertical-lr-blocks.html vertical-lr-blocks_ref.html == table_auto_width.html table_auto_width_ref.html == inline_whitespace_b.html inline_whitespace_ref.html == inline_whitespace_a.html inline_whitespace_ref.html +== whitespace_pre.html whitespace_pre_ref.html == line_height_a.html line_height_ref.html == block_replaced_content_a.html block_replaced_content_ref.html == block_replaced_content_b.html block_replaced_content_ref.html diff --git a/tests/ref/whitespace_pre.html b/tests/ref/whitespace_pre.html new file mode 100644 index 00000000000..59420b9c5d3 --- /dev/null +++ b/tests/ref/whitespace_pre.html @@ -0,0 +1,16 @@ + + +
+