mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
update grammar to support #
This commit is contained in:
@@ -4,7 +4,7 @@ require 'English'
|
||||
|
||||
module Liquid
|
||||
class BlockBody
|
||||
LiquidTagToken = /\A\s*(\w+)\s*(.*?)\z/o
|
||||
LiquidTagToken = /\A\s*([\w#]+)\s*(.*?)\z/o
|
||||
FullToken = /\A#{TagStart}#{WhitespaceControl}?(\s*)(\w+)(\s*)(.*?)#{WhitespaceControl}?#{TagEnd}\z/om
|
||||
ContentOfVariable = /\A#{VariableStart}#{WhitespaceControl}?(.*?)#{WhitespaceControl}?#{VariableEnd}\z/om
|
||||
WhitespaceOrNothing = /\A\s*\z/
|
||||
|
||||
@@ -7,7 +7,7 @@ class InlineCommentTest < Minitest::Test
|
||||
|
||||
def test_basic_usage
|
||||
template_source = <<-END_TEMPLATE
|
||||
foo{% -- this is a comment %}bar
|
||||
foo{% # this is a comment %}bar
|
||||
END_TEMPLATE
|
||||
template = Template.parse(template_source)
|
||||
rendered = template.render!
|
||||
|
||||
Reference in New Issue
Block a user