X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/html/m_pre.cpp diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index f522512994..5afcbbc6b7 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: m_pre.cpp +// Name: src/html/m_pre.cpp // Purpose: wxHtml module for
 ... 
tag (code citation) // Author: Vaclav Slavik // RCS-ID: $Id$ @@ -9,13 +9,13 @@ #include "wx/wxprec.h" -#include "wx/defs.h" -#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#ifndef WXPRECOMP +#if wxUSE_HTML && wxUSE_STREAMS + +#ifndef WX_PRECOMP #endif #include "wx/html/forcelnk.h" @@ -35,7 +35,7 @@ static wxString LINKAGEMODE HtmlizeWhitespaces(const wxString& str) 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('>')) @@ -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();