Render tag styling fixes

This commit is contained in:
Mike Angell 2019-08-31 22:48:25 +10:00
parent ddb45cd658
commit 604d899496
3 changed files with 6 additions and 6 deletions

View File

@ -1,13 +1,13 @@
module Liquid module Liquid
class Render < Tag class Render < Tag
Syntax = /(#{QuotedString})#{QuotedFragment}*/o SYNTAX = /(#{QuotedString})#{QuotedFragment}*/o
attr_reader :template_name_expr, :attributes attr_reader :template_name_expr, :attributes
def initialize(tag_name, markup, options) def initialize(tag_name, markup, options)
super super
raise SyntaxError.new(options[:locale].t("errors.syntax.render".freeze)) unless markup =~ Syntax raise SyntaxError.new(options[:locale].t("errors.syntax.render".freeze)) unless markup =~ SYNTAX
template_name = $1 template_name = $1

View File

@ -4,7 +4,7 @@ class PartialCacheUnitTest < Minitest::Test
def test_uses_the_file_system_register_if_present def test_uses_the_file_system_register_if_present
context = Liquid::Context.build( context = Liquid::Context.build(
registers: { registers: {
file_system: StubFileSystem.new('my_partial' => 'my partial body') file_system: StubFileSystem.new('my_partial' => 'my partial body'),
} }
) )
@ -41,12 +41,12 @@ class PartialCacheUnitTest < Minitest::Test
) )
context_one = Liquid::Context.build( context_one = Liquid::Context.build(
registers: { registers: {
file_system: shared_file_system file_system: shared_file_system,
} }
) )
context_two = Liquid::Context.build( context_two = Liquid::Context.build(
registers: { registers: {
file_system: shared_file_system file_system: shared_file_system,
} }
) )