]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_pre.cpp
added more files to parse
[wxWidgets.git] / src / html / m_pre.cpp
index f522512994122253a8bc1547f0e84f826cba0005..4b5a71c7aa547e13bddf4a6fa0f0469d5d3ceb82 100644 (file)
@@ -104,14 +104,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
         c->SetAlignHor(wxHTML_ALIGN_LEFT);
         c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
 
-        wxString srcMid =
-            m_WParser->GetSource()->Mid(tag.GetBeginPos(),
-                                        tag.GetEndPos1() - tag.GetBeginPos());
-        // It is safe to temporarily change the source being parsed,
-        // provided we restore the state back after parsing
-        m_Parser->SetSourceAndSaveState(HtmlizeWhitespaces(srcMid));
-        m_Parser->DoParsing();
-        m_Parser->RestoreState();
+        wxString srcMid = m_WParser->GetInnerSource(tag);
+        ParseInnerSource(HtmlizeWhitespaces(srcMid));
 
         m_WParser->CloseContainer();
         m_WParser->CloseContainer();