Permalink
Browse files

Use language identifier instead of file extension for language attribute

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Sep 28, 2017
1 parent 103005f commit ed9acb6e1bb81a2eec334180f7b8c1bf0598b444
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/xmldocvisitor.cpp
  2. +1 −1 templates/xml/compound.xsd
  3. +2 −2 testing/014/indexpage.xml
@@ -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());
@@ -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">
@@ -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"/>

0 comments on commit ed9acb6

Please sign in to comment.