Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix OTP R15B compatibility issue (re:run instead of regexp:match).

  • Loading branch information...
commit 37e5834172adeabab3aae4352de594c98556d309 1 parent 19ddfd5
@master master authored lemenkov committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 priv/generator/generator.erl
View
6 priv/generator/generator.erl
@@ -90,7 +90,7 @@ get_ix_http(Doc) ->
doc_links(Root,S)->
RE = "href=\"[A-Za-z-]+.html#id[0-9]+\">[a-z_]+ \\(\\)</a>",
- {match,Ms} = regexp:matches(S,RE),
+ {match,Ms} = re:run(S,RE),
io:fwrite("got ~p links for ~s~n",[length(Ms),basename(dirname(Root))]),
foreach(fun({St,Le})-> do_doc_link(Root,string:substr(S,St,Le)) end, Ms).
@@ -402,9 +402,9 @@ structs(StructsFile) ->
Structs = bio:string(StructsFile, fun do_structs/2, []),
foreach(fun ins_struct/1, Structs).
do_structs(Str, Acc) ->
- case regexp:match(Str,"gn_construct_.*\\(") of
+ case re:run(Str,"gn_construct_.*\\(") of
nomatch -> Acc;
- {match,St,Le} -> [string:substr(Str,St+13,Le-14)|Acc]
+ {match,[{St,Le}]} -> [string:substr(Str,St+13,Le-14)|Acc]
end.
ins_struct(S) -> ets:insert(types,#type{what=struct,cname=S,cast=""}).
Please sign in to comment.
Something went wrong with that request. Please try again.