From d1e80ea77af33307fcb672d7c5aa386172c8a789 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Wed, 12 Apr 2017 08:24:56 +0200 Subject: [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 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lib/erl_docgen/priv/xsl') diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 4c7df1d1a0..6eafa2a165 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: Module:handle_call(Request, From, State) -> Result + For C reference pages the name tag has a substructure where the nametext tag + is used in the sort, as in erl_nif.xml + void *enif_alloc(size_t size) + 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 @@ - - - - - - + + + + + + + + + + + + + -- cgit v1.2.3