Commit 096c5944 authored by Dimitri van Heesch's avatar Dimitri van Heesch

The language specifier in e.g. \code{.py} was ignored for the XML output

parent 5dd0b01a
...@@ -246,12 +246,17 @@ void XmlDocVisitor::visit(DocStyleChange *s) ...@@ -246,12 +246,17 @@ void XmlDocVisitor::visit(DocStyleChange *s)
void XmlDocVisitor::visit(DocVerbatim *s) void XmlDocVisitor::visit(DocVerbatim *s)
{ {
if (m_hide) return; if (m_hide) return;
SrcLangExt langExt = getLanguageFromFileName(m_langExt); QCString lang = m_langExt;
if (!s->language().isEmpty()) // explicit language setting
{
lang = s->language();
}
SrcLangExt langExt = getLanguageFromFileName(lang);
switch(s->type()) switch(s->type())
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<programlisting>"; m_t << "<programlisting>";
Doxygen::parserManager->getParser(m_langExt) Doxygen::parserManager->getParser(lang)
->parseCode(m_ci,s->context(),s->text(),langExt, ->parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile()); s->isExample(),s->exampleFile());
m_t << "</programlisting>"; m_t << "</programlisting>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment