Skip to content

Commit 6851aa3

Browse files
authored
Updated usage of "not expr1 in expr2" to support Elixir 1.5+
Elixir 1.5+ shall be deprecating this operation. I just added parentheses to fix this and also support earlier Elixir versions. See the reported warning below: "not expr1 in expr2" is deprecated. Instead use "expr1 not in expr2" if you require Elixir v1.5+, or "not(expr1 in expr2)" if you have to support earlier Elixir versions.
1 parent 278e6a9 commit 6851aa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/scrivener/html.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ defmodule Scrivener.HTML do
133133
"#{acc}#{if(acc != "", do: "_")}#{Phoenix.Naming.resource_name(model.__struct__)}"
134134
end
135135

136-
defp _pagination_links(_paginator, [view_style: style, path: _path, args: _args, page_param: _page_param, params: _params]) when not style in @view_styles do
136+
defp _pagination_links(_paginator, [view_style: style, path: _path, args: _args, page_param: _page_param, params: _params]) when not (style in @view_styles) do
137137
raise "Scrivener.HTML: View style #{inspect style} is not a valid view style. Please use one of #{inspect @view_styles}"
138138
end
139139

0 commit comments

Comments
 (0)