Allow raw tag to be used with whitespace control

This commit is contained in:
Marco Concetto Rudilosso
2023-02-01 13:49:51 +00:00
parent 6a888d4564
commit 74e505f6fa
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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
+1
View File
@@ -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