LibHTML: Collapse whitespace in LayoutText unless white-space: pre;

Before breaking the Text node contents into words, collapse all of the
whitespace into single space (' ') characters. This fixes broken
rendering of paragraphs with newlines in them. :^)
This commit is contained in:
Andreas Kling 2019-10-09 16:29:23 +02:00
parent b4389ca4b0
commit 2ac190dc5f
Notes: sideshowbarker 2024-07-19 11:44:49 +09:00
2 changed files with 22 additions and 4 deletions

View file

@ -28,4 +28,6 @@ private:
void for_each_word(Callback) const;
template<typename Callback>
void for_each_source_line(Callback) const;
String m_text_for_rendering;
};