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