From ea249d925d4f094de86f4c265d9cc3ee7cab6c64 Mon Sep 17 00:00:00 2001 From: Peter Arentsen Date: Tue, 22 Jan 2019 15:59:52 +0100 Subject: [PATCH] No longer cast all tag/blocks to atom --- lib/liquid/registers.ex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/liquid/registers.ex b/lib/liquid/registers.ex index d2cb3615..79c10f6d 100644 --- a/lib/liquid/registers.ex +++ b/lib/liquid/registers.ex @@ -27,7 +27,13 @@ defmodule Liquid.Registers do end def lookup(name) when is_binary(name) do - name |> String.to_atom() |> lookup + try do + name + |> String.to_existing_atom() + |> lookup() + rescue + ArgumentError -> nil + end end def lookup(name) when is_atom(name) do