diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-07-04 18:58:02 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-07-04 18:58:02 (GMT) |
commit | 285d9c6265b673238b1a97bb7da5ea48aff16beb (patch) | |
tree | 664f7eba133cf2b4d4e8add25229777806fc9b8c /src/htmldocvisitor.cpp | |
parent | d3c3bbd02543280d12a763d82aa5b54ce516c57f (diff) | |
download | Doxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.zip Doxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.tar.gz Doxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.tar.bz2 |
Release-1.3.7-20040704
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 189c102..dd1f6df 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -27,6 +27,9 @@ #include "message.h" #include "config.h" +#define PREFRAG_START "<div class=\"fragment\"><pre>" +#define PREFRAG_END "</pre></div" + static QString htmlAttribsToString(const HtmlAttribList &attribs) { QString result; @@ -189,14 +192,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s) switch(s->type()) { case DocVerbatim::Code: // fall though - m_t << "<pre><div class=\"fragment\">"; + m_t << PREFRAG_START; parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile()); - m_t << "</div></pre>"; + m_t << PREFRAG_END; break; case DocVerbatim::Verbatim: - m_t << "<pre><div class=\"fragment\">"; + m_t << PREFRAG_START; filter(s->text()); - m_t << "</div></pre>"; + m_t << PREFRAG_END; break; case DocVerbatim::HtmlOnly: m_t << s->text(); @@ -246,17 +249,17 @@ void HtmlDocVisitor::visit(DocInclude *inc) switch(inc->type()) { case DocInclude::Include: - m_t << "<pre><div class=\"fragment\">"; + m_t << PREFRAG_START; parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile()); - m_t << "</div></pre>"; + m_t << PREFRAG_END; break; case DocInclude::IncWithLines: { - m_t << "<pre><div class=\"fragment\">"; + m_t << PREFRAG_START; QFileInfo cfi( inc->file() ); FileDef fd( cfi.dirPath(), cfi.fileName() ); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd); - m_t << "</div></pre>"; + m_t << PREFRAG_END; } break; case DocInclude::DontInclude: @@ -265,9 +268,9 @@ void HtmlDocVisitor::visit(DocInclude *inc) m_t << inc->text(); break; case DocInclude::VerbInclude: - m_t << "<pre><div class=\"fragment\">"; + m_t << PREFRAG_START; filter(inc->text()); - m_t << "</div></pre>"; + m_t << PREFRAG_END; break; } } @@ -278,7 +281,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op) // op->type(),op->isFirst(),op->isLast(),op->text().data()); if (op->isFirst()) { - if (!m_hide) m_t << "<pre><div class=\"fragment\">"; + if (!m_hide) m_t << PREFRAG_START; pushEnabled(); m_hide=TRUE; } @@ -292,7 +295,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op) if (op->isLast()) { popEnabled(); - if (!m_hide) m_t << "</div></pre>"; + if (!m_hide) m_t << PREFRAG_END; } else { |