Skip to content

Commit

Permalink
Merge branch 'main' into me/blocks-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Dec 7, 2023
2 parents 0dad939 + 65f464a commit cba6cd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/style/pipes.ex
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ defmodule Styler.Style.Pipes do

for mod <- [:Map, :Keyword] do
# lhs |> Map.merge(%{key: value}) => lhs |> Map.put(key, value)
defp fix_pipe({:|>, pm, [lhs, {{:., dm, [{_, _, [unquote(mod)]} = module, :merge]}, m, [{:%{}, _, [{key, value}]}]}]}),
do: {:|>, pm, [lhs, {{:., dm, [module, :put]}, m, [key, value]}]}
defp fix_pipe({:|>, pm, [lhs, {{:., dm, [{_, _, [unquote(mod)]} = mod, :merge]}, m, [{:%{}, _, [{key, value}]}]}]}),
do: {:|>, pm, [lhs, {{:., dm, [mod, :put]}, m, [key, value]}]}

# lhs |> Map.merge(key: value) => lhs |> Map.put(:key, value)
defp fix_pipe({:|>, pm, [lhs, {{:., dm, [{_, _, [unquote(mod)]} = module, :merge]}, m, [[{key, value}]]}]}),
Expand Down

0 comments on commit cba6cd7

Please sign in to comment.