mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
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
|
||||
|
||||
@@ -12,6 +12,7 @@ class RawTagTest < Minitest::Test
|
||||
|
||||
def test_output_in_raw
|
||||
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