summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2017-09-28 18:22:33 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2017-09-28 18:22:33 (GMT)
commited9acb6e1bb81a2eec334180f7b8c1bf0598b444 (patch)
tree12e014d06d0523547572df7c32fb9314855ca869
parent103005f5251dd0ff50c9c255e5abc9f262abd050 (diff)
downloadDoxygen-ed9acb6e1bb81a2eec334180f7b8c1bf0598b444.zip
Doxygen-ed9acb6e1bb81a2eec334180f7b8c1bf0598b444.tar.gz
Doxygen-ed9acb6e1bb81a2eec334180f7b8c1bf0598b444.tar.bz2
Use language identifier instead of file extension for language attribute
-rw-r--r--src/xmldocvisitor.cpp2
-rw-r--r--templates/xml/compound.xsd2
-rw-r--r--testing/014/indexpage.xml4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index f82f585..5789283 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 language=\"" << lang << "\">";
+ m_t << "<programlisting language=\"" << langToString(langExt) << "\">";
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 50426c0..43cc897 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -264,7 +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:attribute name="language" type="DoxLanguage" use="optional"/>
</xsd:complexType>
<xsd:complexType name="codelineType">
diff --git a/testing/014/indexpage.xml b/testing/014/indexpage.xml
index 82676a3..ad35261 100644
--- a/testing/014/indexpage.xml
+++ b/testing/014/indexpage.xml
@@ -5,7 +5,7 @@
<title>My Project</title>
<detaileddescription>
<para>
- <programlisting language=".py">
+ <programlisting language="Python">
<codeline>
<highlight class="comment">#<sp/>comment<sp/>in<sp/>Python</highlight>
<highlight class="normal"/>
@@ -25,7 +25,7 @@
</programlisting>
</para>
<para>
- <programlisting language=".cpp">
+ <programlisting language="C++">
<codeline>
<highlight class="comment">//<sp/>comment<sp/>in<sp/>a<sp/>code<sp/>block</highlight>
<highlight class="normal"/>