From 141dbfd5a4f79c98da14a1b414c6db4e1b34618b Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Tue, 22 Aug 2017 00:00:25 -0700 Subject: Add language type attribute to programlisting tag The current programlisting tag doesn't have any attribute to indicate the code's language. This makes code highlighting customization difficult. For example, the current doxygen generated document doesn't hightlight javascript code block. If one wants to customize the code block by parsing the xml files and uses 3rd party syntax highlighter, there is no way to tell from the xml file what language the code snippet is using. This change introduces an attribute "lang" to the programlisting tag. --- src/xmldocvisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 815759e..ae36980 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 << ""; + m_t << ""; Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(),langExt, s->isExample(),s->exampleFile()); -- cgit v0.12