diff options
author | Hans Bolinder <[email protected]> | 2016-05-18 10:06:31 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-05-18 10:06:31 +0200 |
commit | 2772cb600349a4a015a478ba5cdfd6188b54bf8a (patch) | |
tree | 4225f0ef1a21472cba13177930c5082c59b80b2c /lib/erl_docgen/priv/xsl/db_html.xsl | |
parent | eed258eb615c1743f4630329abf96986ffaf28e8 (diff) | |
parent | 348227049f0183854adea2d71d9555fda0ed19c8 (diff) | |
download | otp-2772cb600349a4a015a478ba5cdfd6188b54bf8a.tar.gz otp-2772cb600349a4a015a478ba5cdfd6188b54bf8a.tar.bz2 otp-2772cb600349a4a015a478ba5cdfd6188b54bf8a.zip |
Merge branch 'hasse/erl_docgen/datatype_anchors/OTP-13600/ERL-141'
* hasse/erl_docgen/datatype_anchors/OTP-13600/ERL-141:
kernel: Remove no longer needed anchors in documentation
stdlib: Remove no longer needed anchors in documentation
erts: Remove no longer needed anchors in documentation
erl_docgen: Add anchors to datatypes without name attribute
Diffstat (limited to 'lib/erl_docgen/priv/xsl/db_html.xsl')
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_html.xsl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index a3c71fea15..c2d7d40446 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -383,9 +383,7 @@ </xsl:choose> </xsl:when> <xsl:otherwise> <!-- <datatype> with <name> --> - <span class="bold_code"> - <xsl:apply-templates/> - </span> + <xsl:call-template name="name"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -1855,6 +1853,7 @@ </xsl:choose> </xsl:template> + <!-- Used both in <datatype> and in <func>! --> <xsl:template name="name"> <xsl:variable name="tmpstring"> @@ -1911,7 +1910,14 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> - <a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/> + <xsl:choose> + <xsl:when test="ancestor::datatype"> + <a name="type-{$fname}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/> + </xsl:when> + <xsl:otherwise> + <a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> <span class="bold_code"><xsl:value-of select="."/></span> |