summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xmldocvisitor.cpp2
-rw-r--r--templates/xml/compound.xsd1
-rw-r--r--testing/014/indexpage.xml4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 815759e..f82f585 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocVerbatim *s)
switch(s->type())
{
case DocVerbatim::Code: // fall though
- m_t << "<programlisting>";
+ m_t << "<programlisting language=\"" << lang << "\">";
Doxygen::parserManager->getParser(lang)
->parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd
index 29eb1db..50426c0 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -264,6 +264,7 @@
<xsd:sequence>
<xsd:element name="codeline" type="codelineType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
+ <xsd:attribute name="language" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="codelineType">
diff --git a/testing/014/indexpage.xml b/testing/014/indexpage.xml
index 6f62ef2..82676a3 100644
--- a/testing/014/indexpage.xml
+++ b/testing/014/indexpage.xml
@@ -5,7 +5,7 @@
<title>My Project</title>
<detaileddescription>
<para>
- <programlisting>
+ <programlisting language=".py">
<codeline>
<highlight class="comment">#<sp/>comment<sp/>in<sp/>Python</highlight>
<highlight class="normal"/>
@@ -25,7 +25,7 @@
</programlisting>
</para>
<para>
- <programlisting>
+ <programlisting language=".cpp">
<codeline>
<highlight class="comment">//<sp/>comment<sp/>in<sp/>a<sp/>code<sp/>block</highlight>
<highlight class="normal"/>