Merge branch 'develop'

This commit is contained in:
Daniel James 2016-03-21 21:38:38 +00:00
commit 18c73d8f01
3 changed files with 86 additions and 2 deletions

View File

@ -63,8 +63,22 @@ Embedded docbook list:</para><para>
<listitem><para>Second list item</para></listitem> <listitem><para>Second list item</para></listitem>
</itemizedlist> </itemizedlist>
Line 1<sbr/> Line 1<sbr/>
Line 2</para><para><programlisting language="c++">void foo() {} Line 2</para><para><programlisting language="c++">void foo() {}
</programlisting></para><para> void foo2() {}
</programlisting></para><para><programlisting language="c++">void bar() {}
void bar2() {}
</programlisting></para><para>Alternative way of writing code, has a complicated workaround because doxygen treats the empty line as a paragraph separator:</para><programlisting>
int bar();
int bar2();
</programlisting><para>Unfortunately the workaround will merge consecutive blocks, like this:</para><programlisting>
int foo();
int foo2();
</programlisting><para>
</para></description></struct><struct name="specialization_test"><template> </para></description></struct><struct name="specialization_test"><template>
<template-type-parameter name="T"/> <template-type-parameter name="T"/>
</template></struct><struct-specialization name="specialization_test"><template> </template></struct><struct-specialization name="specialization_test"><template>

View File

@ -153,8 +153,36 @@ namespace example
* *
* \code * \code
* void foo() {} * void foo() {}
* void foo2() {}
* \endcode * \endcode
* *
* \code
* void bar() {}
*
* void bar2() {}
* \endcode
*
* Alternative way of writing code, has a complicated workaround
* because doxygen treats the empty line as a paragraph
* separator:
*
* <pre>
* int bar();
*
* int bar2();
* </pre>
*
* Unfortunately the workaround will merge consecutive blocks,
* like this:
*
* <pre>
* int foo();
* </pre>
*
* <pre>
* int foo2();
* </pre>
*
* \tparam TypeParameter A template parameter * \tparam TypeParameter A template parameter
* \tparam NonTypeParameter This is a non-type template parameter * \tparam NonTypeParameter This is a non-type template parameter
* \tparam TypeParameterWithDefault This is a template parameter with a default argument * \tparam TypeParameterWithDefault This is a template parameter with a default argument

View File

@ -1521,6 +1521,10 @@
<sbr/> <sbr/>
</xsl:template> </xsl:template>
<xsl:template match="ndash" mode="passthrough">
<xsl:text>&#8211;</xsl:text>
</xsl:template>
<xsl:template match="briefdescription" mode="passthrough"> <xsl:template match="briefdescription" mode="passthrough">
<xsl:if test="text()|*"> <xsl:if test="text()|*">
<purpose> <purpose>
@ -1706,6 +1710,44 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!-- Handle preformatted.
Doxygen generates markup such as:
<para><preformatted>void foo() {</preformatted></para>
<para><preformatted>}</preformatted></para>
This complicated mess tries to combine that into a single
programlisting element.
-->
<xsl:template match="para[preformatted][count(preformatted)=count(*)]" mode="passthrough">
<!-- Only do this for the first of a group of paras. -->
<xsl:if test="not(preceding-sibling::para[1][preformatted][count(preformatted)=count(*)])">
<programlisting>
<!-- This node's children. -->
<xsl:apply-templates mode="passthrough" select="./preformatted/node()"/>
<!-- Adjacent para nodes' children.
Based on code at: http://stackoverflow.com/a/2092144 -->
<xsl:variable name="following-siblings" select="following-sibling::*" />
<xsl:for-each select="following-sibling::para[preformatted][count(preformatted)=count(*)]">
<xsl:variable name="index" select="position()"/>
<xsl:if test="generate-id(.)=generate-id($following-siblings[$index])">
<xsl:text>&#xa;&#xa;</xsl:text>
<xsl:apply-templates mode="passthrough" select="./preformatted/node()"/>
</xsl:if>
</xsl:for-each>
</programlisting>
</xsl:if>
</xsl:template>
<!-- Remove empty preformatted elements. -->
<xsl:template match="preformatted[not(node())]" mode="passthrough"/>
<!-- Convert remaining to programlisting. -->
<xsl:template match="preformatted" mode="passthrough">
<programlisting>
<xsl:apply-templates mode="passthrough"/>
</programlisting>
</xsl:template>
<!-- Handle program listings --> <!-- Handle program listings -->
<xsl:template match="programlisting" mode="passthrough"> <xsl:template match="programlisting" mode="passthrough">
<programlisting language="c++"> <programlisting language="c++">