浏览代码

[#149002995] stop eating edoc path config

be a little smarter when generating edocs; loof for some
sort of doc path and then replace w/e was there with the
updated doc paths
pull/1589/head
Sam Sawan 7 年前
父节点
当前提交
d09aaed77d
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. +5
    -6
      src/rebar_prv_edoc.erl

+ 5
- 6
src/rebar_prv_edoc.erl 查看文件

@ -84,9 +84,8 @@ format_error(Reason) ->
has_configured_paths(EdocOpts) ->
proplists:get_value(dir, EdocOpts) =/= undefined.
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(Path, T)].
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.

正在加载...
取消
保存