aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-11-07 09:57:08 +0100
committerHans Bolinder <[email protected]>2017-11-07 09:57:08 +0100
commitf642b74ff710ed1093d218689ac96566d4889fec (patch)
tree999544c2be1cd5acf8b69203a2b668dc44e4359a /lib
parent48a544130717f8dcc603b731013e49430ea72d7e (diff)
parentfeb06ff821acbdaee4b44f5e39be6f522353306c (diff)
downloadotp-f642b74ff710ed1093d218689ac96566d4889fec.tar.gz
otp-f642b74ff710ed1093d218689ac96566d4889fec.tar.bz2
otp-f642b74ff710ed1093d218689ac96566d4889fec.zip
Merge branch 'hasse/erl_docgen/clause_i_anchors/OTP-14321'
* hasse/erl_docgen/clause_i_anchors/OTP-14321: erts: Correct a link in erlang(3) erts: Improve some links in erlang(3) erl_docgen: Insert an anchor for "anchor" attribute
Diffstat (limited to 'lib')
-rw-r--r--lib/erl_docgen/priv/dtd/erlref.dtd1
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl6
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/erl_docgen/priv/dtd/erlref.dtd b/lib/erl_docgen/priv/dtd/erlref.dtd
index 615b88b61a..78d6771f52 100644
--- a/lib/erl_docgen/priv/dtd/erlref.dtd
+++ b/lib/erl_docgen/priv/dtd/erlref.dtd
@@ -33,4 +33,5 @@
<!ATTLIST name name CDATA #IMPLIED
arity CDATA #IMPLIED
clause_i CDATA #IMPLIED
+ anchor CDATA #IMPLIED
n_vars CDATA #IMPLIED>
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index 75614392fb..5b7eae4f73 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -172,6 +172,7 @@
<xsl:template name="spec_name">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="arity" select="@arity"/>
+ <xsl:variable name="anchor" select="@anchor"/>
<xsl:variable name="spec0">
<xsl:call-template name="find_spec"/>
</xsl:variable>
@@ -198,6 +199,11 @@
</xsl:otherwise>
</xsl:choose>
+ <!-- Insert an anchor for "anchor" attribute -->
+ <xsl:if test="string-length($anchor) > 0">
+ <a name="{$anchor}"></a>
+ </xsl:if>
+
<xsl:variable name="global_types" select="ancestor::erlref/datatypes"/>
<xsl:variable name="local_types"
select="../type[string-length(@name) > 0]"/>