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_tr_cite2html.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_tr_cite2html.erl')
-rw-r--r-- | lib/docbuilder/src/docb_tr_cite2html.erl | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/docbuilder/src/docb_tr_cite2html.erl b/lib/docbuilder/src/docb_tr_cite2html.erl index 4ecbfa4e91..77f1c4e636 100644 --- a/lib/docbuilder/src/docb_tr_cite2html.erl +++ b/lib/docbuilder/src/docb_tr_cite2html.erl @@ -39,24 +39,22 @@ purge_body([], _) -> purge_body([{pcdata,_Attrs,_More}|Rest], CiteList) -> purge_body(Rest, CiteList); purge_body([{cite,[{"ID","CDATA",ID}],More}|Rest], CiteList) -> - case lists:keysearch(ID, 1, CiteList) of + case lists:keyfind(ID, 1, CiteList) of false -> [{cite, [{"NAME","CDATA",ID}, {"ID","CDATA",ID}], More}| purge_body(Rest, CiteList)]; - {value, {ID, Name, _Description, _Responsible}} -> + {ID, Name, _Description, _Responsible} -> [{cite, [{"NAME","CDATA",Name}, {"ID","CDATA",ID}], More}| purge_body(Rest, CiteList)]; - {value, {ID, Name, _Description}} -> + {ID, Name, _Description} -> [{cite, [{"NAME","CDATA",Name}, {"ID","CDATA",ID}], More}| purge_body(Rest, CiteList)] end; purge_body([{_Tag,_Attrs,More}|Rest], CiteList) -> - lists:append(purge_body(More, CiteList), - purge_body(Rest, CiteList)). + purge_body(More, CiteList) ++ purge_body(Rest, CiteList). rule([header|_], _) -> {drop, ""}; - rule(_, _) -> {drop, ""}. @@ -91,19 +89,19 @@ rule([cite|_], {_,[Name,ID], [{citedef,[],[{pcdata,[],Def}]}]}, Opts) -> false -> []; Value -> Value end, - case lists:keysearch(ID, 1, CiteList) of + case lists:keyfind(ID, 1, CiteList) of false -> {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ "<strong>" ++ ID ++ "</strong></a></dt>\n<dd>" ++ docb_html_util:pcdata_to_html(Def) ++ "\n</dd>\n"}, Opts}; - {value, {ID, Name, Description, _Responsible}} -> + {ID, Name, Description, _Responsible} -> docb_util:message(warning, "Global cite ~s overriding local", [ID]), {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++ docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"}, Opts}; - {value, {ID, Name, Description}} -> + {ID, Name, Description} -> docb_util:message(warning, "Global cite ~s overriding local", [ID]), {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ @@ -117,19 +115,19 @@ rule([cite|_], {_,[Name,ID],_}, Opts) -> false -> []; Value -> Value end, - case lists:keysearch(ID, 1, CiteList) of + case lists:keyfind(ID, 1, CiteList) of false -> docb_util:message(error, "The cite ~s has no definition", [ID]), {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ "<strong>" ++ ID ++ "</strong></a></dt>\n<dd>" ++ "??" ++ "\n</dd>\n"}, Opts}; - {value, {ID, Name, Description, _Responsible}} -> + {ID, Name, Description, _Responsible} -> {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++ docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"}, Opts}; - {value, {ID, Name, Description}} -> + {ID, Name, Description} -> {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++ docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"}, Opts} |