aboutsummaryrefslogtreecommitdiffstats
path: root/lib/docbuilder/src/docb_tr_part2html.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2010-07-07 10:43:10 +0200
committerRaimo Niskanen <[email protected]>2010-07-07 10:43:10 +0200
commit4e0dc5047e67f8c697c98e4967b44315d54eff1a (patch)
treeece26801f1681c719be4062207e4080314b9a9c6 /lib/docbuilder/src/docb_tr_part2html.erl
parent91078fbc7b0719150a0c7749a1de9e5c0c9bbdeb (diff)
parent8e79baa449f43889f7e92030258df90ab0045a81 (diff)
downloadotp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.tar.gz
otp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.tar.bz2
otp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.zip
Merge branch 'ks/cleanups' into dev
* ks/cleanups: compiler: Fix incorrect types and specs escript: Add more types to records debugger: Clean up as suggested by tidier docbuilder: Clean up as suggested by tidier Conflicts: lib/debugger/src/dbg_iload.erl lib/debugger/src/dbg_ui_trace_win.erl
Diffstat (limited to 'lib/docbuilder/src/docb_tr_part2html.erl')
-rw-r--r--lib/docbuilder/src/docb_tr_part2html.erl15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/docbuilder/src/docb_tr_part2html.erl b/lib/docbuilder/src/docb_tr_part2html.erl
index dd44c4a8df..30befe8432 100644
--- a/lib/docbuilder/src/docb_tr_part2html.erl
+++ b/lib/docbuilder/src/docb_tr_part2html.erl
@@ -93,8 +93,8 @@ transform(File, {part, _Attrs, [Header| Rest]}, Opts0) ->
case docb_main:parse1("fascicules", Opts0) of
{ok, Parse} ->
FascData = get_fasc_data(Parse),
- case lists:keysearch(File, 1, FascData) of
- {value, {_, _, "YES", _}} ->
+ case lists:keyfind(File, 1, FascData) of
+ {_, _, "YES", _} ->
OrigFile =
docb_util:outfile(File++"_frame",
".html", Opts0),
@@ -137,7 +137,7 @@ concat_files([File | Rest], Body, ChLevel, Opts, TP, TOpts, Ext) ->
case docb_main:parse1(File, Opts) of
{ok, Parse} ->
{TopTag, Attrs, [Header = {header, _, HeaderContents} | More]} = Parse,
- {value,{title,_,Title}} = lists:keysearch(title,1,HeaderContents),
+ {title,_,Title} = lists:keyfind(title,1,HeaderContents),
NewMore = [{section, [], [{title, [], Title}| More]}],
NewParse = {TopTag, Attrs, [Header| NewMore]},
if
@@ -156,9 +156,8 @@ concat_files([File | Rest], Body, ChLevel, Opts, TP, TOpts, Ext) ->
docb_html_util:number(NewParse,
integer_to_list(ChLevel), File),
{_, [], [_| NewBody]} = NumberTree,
- lists:append(Body,
- concat_files(Rest, NewBody, ChLevel+1, Opts,
- TP, TOpts, Ext));
+ Body ++ concat_files(Rest, NewBody, ChLevel+1, Opts,
+ TP, TOpts, Ext);
errors ->
throw({error,"Parse error when building chapter "++File})
end;
@@ -232,9 +231,7 @@ get_fasc_data({fascicules, _, Fascs}) ->
Fascs).
get_avals(Atts) ->
- lists:map(fun(Tuple) ->
- element(3, Tuple) end,
- Atts).
+ [element(3, Tuple) || Tuple <- Atts].
get_pc_text([{pcdata, _, Text}]) ->
Text.