Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
2115-erl_docgen-Update-the-reference-manual-fun...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2115-erl_docgen-Update-the-reference-manual-function-name.patch of Package erlang
From d1e80ea77af33307fcb672d7c5aa386172c8a789 Mon Sep 17 00:00:00 2001 From: Lars Thorsen <lars@erlang.org> Date: Wed, 12 Apr 2017 08:24:56 +0200 Subject: [PATCH] [erl_docgen] Update the reference manual function name sort The function for sorting the table of contents is updated to handle reference manuals with C functions. --- lib/erl_docgen/priv/xsl/db_html.xsl | 23 +++++++++++++++++------ lib/erl_docgen/vsn.mk | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 4c7df1d1a..6eafa2a16 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -66,6 +66,10 @@ Additionally, callbacks may be included, as in gen_server.xml: <name>Module:handle_call(Request, From, State) -> Result</name> + For C reference pages the name tag has a substructure where the nametext tag + is used in the sort, as in erl_nif.xml + <name><ret>void *</ret><nametext>enif_alloc(size_t size)</nametext></name> + So first, get the name from either the attribute or the element value. Then, reverse the case of the first character. This is because xsltproc, used for processing, orders uppercase before lowercase (even when the 'case-order="lower-first"' option @@ -82,12 +86,19 @@ <xsl:variable name="base"> <xsl:choose> - <xsl:when test="string-length($elem/@name) > 0"> - <xsl:value-of select="$elem/@name"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$elem"/> - </xsl:otherwise> + <xsl:when test="ancestor::cref"> + <xsl:value-of select="$elem/nametext"/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="string-length($elem/@name) > 0"> + <xsl:value-of select="$elem/@name"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$elem"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> </xsl:choose> </xsl:variable> diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk index d6106a282..8fad061b2 100644 --- a/lib/erl_docgen/vsn.mk +++ b/lib/erl_docgen/vsn.mk @@ -1 +1 @@ -ERL_DOCGEN_VSN = 0.6.1 +ERL_DOCGEN_VSN = 0.7 -- 2.12.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor