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