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 From 4e4741221f4290412ef4a6b6bbfe9799abafaf6c Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Tue, 22 Aug 2017 07:36:43 -0700 Subject: Use language in stead of lang for language name attribute --- src/xmldocvisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index ae36980..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 << ""; + m_t << ""; Doxygen::parserManager->getParser(lang) ->parseCode(m_ci,s->context(),s->text(),langExt, s->isExample(),s->exampleFile()); -- cgit v0.12 From 0259d2a8bf9571e06873b80df96fd2ff29723dbc Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Mon, 4 Sep 2017 16:57:12 -0700 Subject: update compound.xsd to add language attribute add language attribute (optional) to listingType Changes to be committed: modified: templates/xml/compound.xsd --- templates/xml/compound.xsd | 1 + 1 file changed, 1 insertion(+) 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 @@ + -- cgit v0.12 From a9963fd94acd5839e818890b6a356d6b335c1f74 Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Tue, 26 Sep 2017 09:46:55 -0700 Subject: fix test to support new programlisting attribute fix unit test to support the new programlisting attribute "language" --- testing/014/indexpage.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ My Project - + #commentinPython @@ -25,7 +25,7 @@ - + //commentinacodeblock -- cgit v0.12