瀏覽代碼

Local corrections on string processing:

* Corrected regexp: `[x|y]` -> `[xy]`.
* Used an re:replace/4 option instead of multiple IOlist functions.
pull/3/head
Pierre Fenoll 11 年之前
父節點
當前提交
e3d2142df5
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      src/rebar_erlc_compiler.erl

+ 1
- 2
src/rebar_erlc_compiler.erl 查看文件

@ -119,8 +119,7 @@ clean(Config, _AppFile) ->
YrlFiles = rebar_utils:find_files("src", "^.*\\.[x|y]rl\$"), YrlFiles = rebar_utils:find_files("src", "^.*\\.[x|y]rl\$"),
rebar_file_utils:delete_each( rebar_file_utils:delete_each(
[ binary_to_list(iolist_to_binary(re:replace(F, "\\.[x|y]rl$", ".erl")))
|| F <- YrlFiles ]),
[re:replace(F, "\\.[xy]rl$", ".erl", [{return,list}]) || F <- YrlFiles]),
%% Delete the build graph, if any %% Delete the build graph, if any
rebar_file_utils:rm_rf(erlcinfo_file(Config)), rebar_file_utils:rm_rf(erlcinfo_file(Config)),

Loading…
取消
儲存