diff options
author | Zandra <[email protected]> | 2016-02-04 15:53:29 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2016-02-04 15:53:29 +0100 |
commit | a03b7add86b92d0d7d2d744e5555314bedbc2197 (patch) | |
tree | 1c3d842bcc30105b4c8427089f8b4634f5596bd7 | |
parent | 51815ee36289f4e048a1abbc5b215e5689efb923 (diff) | |
parent | 17582bae6c651747d847726db75664838433681e (diff) | |
download | otp-a03b7add86b92d0d7d2d744e5555314bedbc2197.tar.gz otp-a03b7add86b92d0d7d2d744e5555314bedbc2197.tar.bz2 otp-a03b7add86b92d0d7d2d744e5555314bedbc2197.zip |
Merge branch 'tnt-dev/fix-function-index-sort' into maint
* tnt-dev/fix-function-index-sort:
Don't sort function index when it's not necessary
OTP-13302
-rw-r--r-- | lib/edoc/src/edoc_layout.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl index b67ec31ae3..f723cd8373 100644 --- a/lib/edoc/src/edoc_layout.erl +++ b/lib/edoc/src/edoc_layout.erl @@ -180,7 +180,9 @@ layout_module(#xmlElement{name = module, content = Es}=E, Opts) -> FullDesc = get_content(fullDescription, Desc), Functions = [{function_name(E), E} || E <- get_content(functions, Es)], Types = [{type_name(E), E} || E <- get_content(typedecls, Es)], - SortedFs = lists:sort(Functions), + SortedFs = if Opts#opts.sort_functions -> lists:sort(Functions); + true -> Functions + end, Body = (navigation("top") ++ [?NL, hr, ?NL, ?NL, {h1, Title}, ?NL] ++ doc_index(FullDesc, Functions, Types) @@ -204,9 +206,7 @@ layout_module(#xmlElement{name = module, content = Es}=E, Opts) -> end ++ types(lists:sort(Types), Opts) ++ function_index(SortedFs, Opts#opts.index_columns) - ++ if Opts#opts.sort_functions -> functions(SortedFs, Opts); - true -> functions(Functions, Opts) - end + ++ functions(SortedFs, Opts) ++ [hr, ?NL] ++ navigation("bottom") ++ timestamp()), |