/////////////////////////////////////////////////////////////////////////////
-// Name: m_pre.cpp
+// Name: src/html/m_pre.cpp
// Purpose: wxHtml module for <PRE> ... </PRE> tag (code citation)
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation
-#endif
-
#include "wx/wxprec.h"
-#include "wx/defs.h"
-#if wxUSE_HTML && wxUSE_STREAMS
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_HTML && wxUSE_STREAMS
+
#ifndef WXPRECOMP
#endif
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();