Skip to content

Commit a64f28c

Browse files
committed
Only emit deprecation warning for EEx if handle_text/3 is missing
1 parent c923f73 commit a64f28c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/eex/lib/eex/compiler.ex

+2-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ defmodule EEx.Compiler do
306306

307307
init = state.engine.init(opts)
308308

309-
if function_exported?(state.engine, :handle_text, 2) do
309+
if function_exported?(state.engine, :handle_text, 2) and
310+
not function_exported?(state.engine, :handle_text, 3) do
310311
IO.warn(
311312
"#{inspect(state.engine)}.handle_text/2 is deprecated, implement handle_text/3 instead"
312313
)

0 commit comments

Comments
 (0)