Do not escape dbg options, closes #14839

This commit is contained in:
José Valim
2025-10-17 22:15:14 +02:00
parent c265744b9c
commit 43aeded377
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -2700,7 +2700,7 @@ defmodule Macro do
:ok
end
prelude = quote do: options = unquote(Macro.escape(options))
prelude = quote do: options = unquote(options)
acc = {prelude, dbg_format_header(env)}
{acc, nil} =
+5
View File
@@ -1484,6 +1484,11 @@ defmodule KernelTest do
assert output =~ "3"
end
test "prints the given expression with complex options" do
output = capture_io(fn -> assert dbg(123, [] ++ []) == 123 end)
assert output =~ "kernel_test.exs"
end
test "doesn't print any colors if :syntax_colors is []" do
output =
capture_io(fn ->