From 09a5b57ebe871cb3f214214d34a47aaeec383cee Mon Sep 17 00:00:00 2001 From: Tristan Hume Date: Fri, 30 Aug 2013 15:55:43 -0400 Subject: [PATCH] Fix variable closing error message --- lib/liquid/block.rb | 2 +- lib/liquid/locales/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/liquid/block.rb b/lib/liquid/block.rb index 4a210d77..0281b91d 100644 --- a/lib/liquid/block.rb +++ b/lib/liquid/block.rb @@ -103,7 +103,7 @@ module Liquid token.scan(ContentOfVariable) do |content| return Variable.new(content.first, @options) end - raise SyntaxError.new(options[:locale].t("errors.syntax.tag_termination", :token => token, :tag_end => TagEnd.inspect)) + raise SyntaxError.new(options[:locale].t("errors.syntax.variable_termination", :token => token, :tag_end => VariableEnd.inspect)) end def render(context) diff --git a/lib/liquid/locales/en.yml b/lib/liquid/locales/en.yml index a6ce9355..09f0ad86 100644 --- a/lib/liquid/locales/en.yml +++ b/lib/liquid/locales/en.yml @@ -16,6 +16,7 @@ invalid_delimiter: "'end' is not a valid delimiter for %{block_name} tags. use %{block_delimiter}" unexpected_else: "%{block_name} tag does not expect else tag" tag_termination: "Tag '%{token}' was not properly terminated with regexp: %{tag_end}" + variable_termination: "Variable '%{token}' was not properly terminated with regexp: %{tag_end}" tag_never_closed: "'%{block_name}' tag was never closed" meta_syntax_error: "Liquid syntax error: #{e.message}" table_row: "Syntax Error in 'table_row loop' - Valid syntax: table_row [item] in [collection] cols=3"