/////////////////////////////////////////////////////////////////////////////
-// 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$
#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
size_t linepos = 0;
for (size_t i = 0; i < len; i++)
{
- switch (str[i])
+ switch ( str[i].GetValue() )
{
case wxT('<'):
while (i < len && str[i] != wxT('>'))
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();