mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge pull request #1683 from Shopify/marco/raw-tag-whitespace-control
Allow raw tag to be used with whitespace control
This commit is contained in:
@@ -14,7 +14,7 @@ module Liquid
|
||||
# @liquid_syntax_keyword expression The expression to be output without being rendered.
|
||||
class Raw < Block
|
||||
Syntax = /\A\s*\z/
|
||||
FullTokenPossiblyInvalid = /\A(.*)#{TagStart}\s*(\w+)\s*(.*)?#{TagEnd}\z/om
|
||||
FullTokenPossiblyInvalid = /\A(.*)#{TagStart}#{WhitespaceControl}?\s*(\w+)\s*(.*)?#{WhitespaceControl}?#{TagEnd}\z/om
|
||||
|
||||
def initialize(tag_name, markup, parse_context)
|
||||
super
|
||||
|
||||
@@ -11,7 +11,8 @@ class RawTagTest < Minitest::Test
|
||||
end
|
||||
|
||||
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 -%} <')
|
||||
end
|
||||
|
||||
def test_open_tag_in_raw
|
||||
|
||||
Reference in New Issue
Block a user