slim 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 1.2.2
2
+
3
+ * Fix issue #264
4
+
1
5
  1.2.1
2
6
 
3
7
  * Support stylus as embedded engine
data/README.md CHANGED
@@ -405,7 +405,10 @@ This project is released under the MIT license.
405
405
 
406
406
  * [Rails 3 Generators](https://github.com/leogalmeida/slim-rails)
407
407
 
408
- * [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
409
- * [Slim for Clojure](https://github.com/chaslemley/slim.clj)
410
- * [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
411
408
  * [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
409
+
410
+ * [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
411
+ * [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
412
+ * [Plim (Python port of Slim)](https://github.com/2nd/plim)
413
+ * [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
414
+
@@ -10,7 +10,7 @@ module Slim
10
10
  #
11
11
  # @api private
12
12
  class EndInserter < Filter
13
- ELSE_REGEX = /\Aelse|elsif|when\b/
13
+ ELSE_REGEX = /\A(else|elsif|when)\b/
14
14
  END_REGEX = /\Aend\b/
15
15
 
16
16
  # Handle multi expression `[:multi, *exps]`
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  # Slim version string
3
3
  # @api public
4
- VERSION = '1.2.1'
4
+ VERSION = '1.2.2'
5
5
  end
@@ -37,6 +37,18 @@ div
37
37
  assert_html '<div><p>The second paragraph</p></div>', source
38
38
  end
39
39
 
40
+ def test_render_with_when_string_in_condition
41
+ source = %q{
42
+ - if true
43
+ | Hello
44
+
45
+ - unless 'when' == nil
46
+ | world
47
+ }
48
+
49
+ assert_html 'Hello world', source
50
+ end
51
+
40
52
  def test_render_with_conditional_and_following_nonconditonal
41
53
  source = %q{
42
54
  div
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-05-22 00:00:00.000000000 Z
14
+ date: 2012-06-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: temple
18
- requirement: &10177380 !ruby/object:Gem::Requirement
18
+ requirement: &19629360 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 0.4.0
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *10177380
26
+ version_requirements: *19629360
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tilt
29
- requirement: &10143080 !ruby/object:Gem::Requirement
29
+ requirement: &19628360 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ~>
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 1.3.3
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *10143080
37
+ version_requirements: *19628360
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rake
40
- requirement: &10142440 !ruby/object:Gem::Requirement
40
+ requirement: &19627580 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 0.8.7
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *10142440
48
+ version_requirements: *19627580
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: sass
51
- requirement: &10141640 !ruby/object:Gem::Requirement
51
+ requirement: &19626760 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 3.1.0
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *10141640
59
+ version_requirements: *19626760
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: minitest
62
- requirement: &10140540 !ruby/object:Gem::Requirement
62
+ requirement: &19626240 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *10140540
70
+ version_requirements: *19626240
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: kramdown
73
- requirement: &10137320 !ruby/object:Gem::Requirement
73
+ requirement: &19625720 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *10137320
81
+ version_requirements: *19625720
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: creole
84
- requirement: &10523440 !ruby/object:Gem::Requirement
84
+ requirement: &19625040 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *10523440
92
+ version_requirements: *19625040
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: builder
95
- requirement: &10521700 !ruby/object:Gem::Requirement
95
+ requirement: &19624240 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '0'
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *10521700
103
+ version_requirements: *19624240
104
104
  description: Slim is a template language whose goal is reduce the syntax to the essential
105
105
  parts without becoming cryptic.
106
106
  email: