From 26faf512a12442f8e4f352e59c8d3df6754052bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCtke?= Date: Tue, 10 Mar 2009 17:23:17 -0400 Subject: [PATCH] bump --- Rakefile | 2 +- lib/liquid/tags/cycle.rb | 2 +- test/standard_tag_test.rb | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index a2057ac..a1885eb 100755 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ require 'rubygems' require 'rake' require 'hoe' -PKG_VERSION = "1.9.0" +PKG_VERSION = "2.0.0" PKG_NAME = "liquid" PKG_DESC = "A secure non evaling end user template engine with aesthetic markup." diff --git a/lib/liquid/tags/cycle.rb b/lib/liquid/tags/cycle.rb index 64d6d20..bc39d3f 100644 --- a/lib/liquid/tags/cycle.rb +++ b/lib/liquid/tags/cycle.rb @@ -14,7 +14,7 @@ module Liquid # class Cycle < Tag SimpleSyntax = /^#{Expression}/ - NamedSyntax = /^(#{Expression})\s*\:\s*(.*)/ + NamedSyntax = /^(#{Expression})\s*\:\s*(.*)/ def initialize(tag_name, markup, tokens) case markup diff --git a/test/standard_tag_test.rb b/test/standard_tag_test.rb index 2ce32e2..abb8457 100644 --- a/test/standard_tag_test.rb +++ b/test/standard_tag_test.rb @@ -345,8 +345,7 @@ HERE end - - + def test_cycle assert_template_result('one','{%cycle "one", "two"%}') @@ -355,6 +354,9 @@ HERE assert_template_result('one two one','{%cycle "one", "two"%} {%cycle "one", "two"%} {%cycle "one", "two"%}') assert_template_result('text-align: left text-align: right','{%cycle "text-align: left", "text-align: right" %} {%cycle "text-align: left", "text-align: right"%}') + + assert_template_result(' ','{% cycle "", "", "" %}') + assert_template_result(' ','{% cycle "", "", "" %} {% cycle "", "", "" %} {% cycle "", "", "" %} {% cycle "", "", "" %}') end