summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_edoc.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rebar_prv_edoc.erl b/src/rebar_prv_edoc.erl
index 6e58ad5..d663b0c 100644
--- a/src/rebar_prv_edoc.erl
+++ b/src/rebar_prv_edoc.erl
@@ -84,8 +84,9 @@ format_error(Reason) ->
has_configured_paths(EdocOpts) ->
proplists:get_value(dir, EdocOpts) =/= undefined.
-add_to_paths(Opts, Path) ->
- case proplists:get_value(doc_path, Opts) of
- undefined -> [{doc_path, [Path]} | Opts];
- Paths -> lists:keyreplace(doc_path, 1, Opts, {doc_path, [Path | Paths]})
- end.
+add_to_paths([], Path) ->
+ [{doc_path, [Path]}];
+add_to_paths([{doc_path, Paths}|T], Path) ->
+ [{doc_path, [Path | Paths]} | T];
+add_to_paths([H|T], Path) ->
+ [H | add_to_paths(T, Path)].