diff --git a/samples/html/test/regres.htm b/samples/html/test/regres.htm index 7e61edcbc8..a98d37adf2 100644 --- a/samples/html/test/regres.htm +++ b/samples/html/test/regres.htm @@ -6,5 +6,9 @@ Unbreakable word

+

+<pre> text, 50% wide
+
+ diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index 76090c9398..2594df910c 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -94,6 +94,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE") m_WParser->CloseContainer(); c = m_WParser->OpenContainer(); + c->SetWidthFloat(tag); + c = m_WParser->OpenContainer(); c->SetAlignHor(wxHTML_ALIGN_LEFT); c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP); @@ -106,6 +108,7 @@ TAG_HANDLER_BEGIN(PRE, "PRE") m_Parser->DoParsing(); m_Parser->RestoreState(); + m_WParser->CloseContainer(); m_WParser->CloseContainer(); c = m_WParser->OpenContainer();