From 30eb4c95911df85bd2e14ff9540914c66864b293 Mon Sep 17 00:00:00 2001 From: Brian Cardarella Date: Tue, 23 Jul 2024 20:55:45 -0400 Subject: [PATCH] Fix --- lib/sourceror.ex | 1 + test/sourceror_test.exs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sourceror.ex b/lib/sourceror.ex index 7b1aa7b..50cfa1b 100644 --- a/lib/sourceror.ex +++ b/lib/sourceror.ex @@ -903,6 +903,7 @@ defmodule Sourceror do {name, _meta, args}, acc -> {{name, {}, args}, acc} other, acc -> {other, acc} end) + |> elem(0) end defp do_patch_string(lines, [], seen, _), do: Enum.reverse(lines) ++ seen diff --git a/test/sourceror_test.exs b/test/sourceror_test.exs index 2e53e7d..abb0184 100644 --- a/test/sourceror_test.exs +++ b/test/sourceror_test.exs @@ -1238,9 +1238,9 @@ defmodule SourcerorTest do quoted = Sourceror.parse_string!(original) assert Sourceror.strip_meta(quoted) == { - {:hello, {}, - [{:world, {}, nil}, [{{:__block__, {}, [:do]}, {:__block__, {}, [:ok]}}]]}, - [] + :hello, + {}, + [{:world, {}, nil}, [{{:__block__, {}, [:do]}, {:__block__, {}, [:ok]}}]] } end end