diff options
author | Raimo Niskanen <[email protected]> | 2010-07-07 10:43:10 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-07-07 10:43:10 +0200 |
commit | 4e0dc5047e67f8c697c98e4967b44315d54eff1a (patch) | |
tree | ece26801f1681c719be4062207e4080314b9a9c6 /lib/docbuilder/src/docb_html_util.erl | |
parent | 91078fbc7b0719150a0c7749a1de9e5c0c9bbdeb (diff) | |
parent | 8e79baa449f43889f7e92030258df90ab0045a81 (diff) | |
download | otp-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_html_util.erl')
-rw-r--r-- | lib/docbuilder/src/docb_html_util.erl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/docbuilder/src/docb_html_util.erl b/lib/docbuilder/src/docb_html_util.erl index b2951706ea..02ce8b52a7 100644 --- a/lib/docbuilder/src/docb_html_util.erl +++ b/lib/docbuilder/src/docb_html_util.erl @@ -136,7 +136,6 @@ copy_pics(Src, Dest, Opts) -> Dir = code:lib_dir(docbuilder), InFile = filename:join([Dir, "etc", Src]), OutFile = docb_util:outfile(Dest, "", Opts), - case filelib:last_modified(OutFile) of 0 -> % File doesn't exist file:copy(InFile, OutFile); @@ -156,10 +155,10 @@ copy_pics(Src, Dest, Opts) -> %%--Resolve header data------------------------------------------------- extract_header_data(Key, {header, [], List}) -> - case lists:keysearch(Key, 1, List) of - {value, {Key, [], []}} -> + case lists:keyfind(Key, 1, List) of + {Key, [], []} -> ""; - {value, {Key, [], [{pcdata, [], Value}]}} -> + {Key, [], [{pcdata, [], Value}]} -> pcdata_to_html(Value); false -> "" @@ -253,7 +252,7 @@ make_anchor_href(HRef) -> {ok, [HRef]} -> %% No `#' in HRef, i.e. only path make_anchor_href(HRef, ""); - {ok, [Path, Fragment]}-> + {ok, [Path, Fragment]} -> make_anchor_href(Path, Fragment) end. @@ -398,10 +397,10 @@ count_sections([]) -> %%--Make a ToC---------------------------------------------------------- format_toc(Toc) -> - lists:map(fun({Number, Title}) -> - [Number, " <a href = \"#", Number, - "\">", Title, "</a><br/>\n"] - end, Toc). + [format_toc1(T) || T <- Toc]. + +format_toc1({Number, Title}) -> + [Number, " <a href = \"#", Number, "\">", Title, "</a><br/>\n"]. %%--Convert HTML ISO Latin 1 characters to ordinary characters---------- |