mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 16:25:42 +03:00
Compare commits
2 Commits
raw-post-t
...
experiment
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f439f73ba | ||
|
|
5face68cc8 |
@@ -1,11 +1,15 @@
|
||||
language: ruby
|
||||
cache: bundler
|
||||
os: [osx, linux]
|
||||
|
||||
rvm:
|
||||
- 2.4
|
||||
- 2.5
|
||||
- &latest_ruby 2.6
|
||||
- 2.7
|
||||
- 2.7.0-preview1
|
||||
- 2.7.0-preview2
|
||||
- 2.7.0-preview3
|
||||
- ruby-head
|
||||
|
||||
matrix:
|
||||
@@ -15,6 +19,9 @@ matrix:
|
||||
name: Profiling Memory Usage
|
||||
allow_failures:
|
||||
- rvm: ruby-head
|
||||
- rvm: 2.7
|
||||
- rvm: 2.7.0-preview2
|
||||
- rvm: 2.7.0-preview3
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
||||
@@ -16,10 +16,7 @@ module Liquid
|
||||
while (token = tokens.shift)
|
||||
if token =~ FullTokenPossiblyInvalid
|
||||
@body << Regexp.last_match(1) if Regexp.last_match(1) != ""
|
||||
if block_delimiter == Regexp.last_match(2)
|
||||
@parse_context.trim_whitespace = (token[-3] == WhitespaceControl)
|
||||
return
|
||||
end
|
||||
return if block_delimiter == Regexp.last_match(2)
|
||||
end
|
||||
@body << token unless token.empty?
|
||||
end
|
||||
|
||||
@@ -14,10 +14,6 @@ class RawTagTest < Minitest::Test
|
||||
assert_template_result('{{ test }}', '{% raw %}{{ test }}{% endraw %}')
|
||||
end
|
||||
|
||||
def test_post_trim
|
||||
assert_template_result('hi', "{% raw %}hi{% endraw -%}\n")
|
||||
end
|
||||
|
||||
def test_open_tag_in_raw
|
||||
assert_template_result(' Foobar {% invalid ', '{% raw %} Foobar {% invalid {% endraw %}')
|
||||
assert_template_result(' Foobar invalid %} ', '{% raw %} Foobar invalid %} {% endraw %}')
|
||||
|
||||
Reference in New Issue
Block a user