mirror of
https://github.com/Shopify/liquid.git
synced 2025-08-15 00:02:47 -04:00
Compare commits
2 Commits
81ed65f2a1
...
42e5c52336
Author | SHA1 | Date | |
---|---|---|---|
|
42e5c52336 | ||
|
649cca1349 |
@ -26,6 +26,7 @@ module Liquid
|
|||||||
@body = +''
|
@body = +''
|
||||||
while (token = tokens.shift)
|
while (token = tokens.shift)
|
||||||
if token =~ FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2)
|
if token =~ FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2)
|
||||||
|
parse_context.trim_whitespace = (token[-3] == WhitespaceControl)
|
||||||
@body << Regexp.last_match(1) if Regexp.last_match(1) != ""
|
@body << Regexp.last_match(1) if Regexp.last_match(1) != ""
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -13,8 +13,9 @@ class RawTagTest < Minitest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_output_in_raw
|
def test_output_in_raw
|
||||||
# assert_template_result('{{ test }}', '{% raw %}{{ test }}{% endraw %}')
|
|
||||||
assert_template_result('>{{ test }}<', '> {%- raw -%}{{ test }}{%- endraw -%} <')
|
assert_template_result('>{{ test }}<', '> {%- raw -%}{{ test }}{%- endraw -%} <')
|
||||||
|
assert_template_result("> inner <", "> {%- raw -%} inner {%- endraw %} <")
|
||||||
|
assert_template_result("> inner <", "> {%- raw -%} inner {%- endraw -%} <")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_open_tag_in_raw
|
def test_open_tag_in_raw
|
||||||
|
Loading…
x
Reference in New Issue
Block a user