diff --git a/lib/mdex.ex b/lib/mdex.ex index 1a49968..0e3d175 100644 --- a/lib/mdex.ex +++ b/lib/mdex.ex @@ -625,16 +625,16 @@ defmodule MDEx do `:curly_braces_in_code` - escape `{` and `}` only inside `` tags, particularly useful for compiling HTML in LiveView; """ def safe_html(unsafe_html, opts \\ []) when is_binary(unsafe_html) and is_list(opts) do - sanitize = opt(opts, [:sanitize], true) + sanitize = opt(opts, [:sanitize], true) escape_content = opt(opts, [:escape, :content], true) escape_curly_braces_in_code = opt(opts, [:escape, :curly_braces_in_code], true) Native.safe_html(unsafe_html, sanitize, escape_content, escape_curly_braces_in_code) end defp opt(opts, keys, default) do - case get_in(opts, keys) do - nil -> default - val -> val - end + case get_in(opts, keys) do + nil -> default + val -> val + end end end