mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Use Tag#raw as the fallback for #format
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def format
|
||||
"{% #{block_name} %}#{@body.format}{% #{block_delimiter} %}"
|
||||
"{% #{raw} %}#{@body.format}{% #{block_delimiter} %}"
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
+5
-6
@@ -24,7 +24,10 @@ module Liquid
|
||||
end
|
||||
|
||||
def raw
|
||||
"#{@tag_name} #{@markup}"
|
||||
tag = @tag_name.strip
|
||||
markup = @markup.strip
|
||||
tag << " #{markup}" unless markup.empty?
|
||||
tag
|
||||
end
|
||||
|
||||
def name
|
||||
@@ -40,11 +43,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def format
|
||||
tag = @tag_name.strip
|
||||
markup = @markup.strip
|
||||
tag << " #{markup}" unless markup.empty?
|
||||
|
||||
"{% #{tag} %}"
|
||||
"{% #{raw} %}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user