ditto_code 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dittocode/parse.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff2bc71ba0731750d144d1878e573f6bc2b85e98
4
- data.tar.gz: b183b41ca6d755444711a1580b253234a08a0bb7
3
+ metadata.gz: af74379b473320c2e99ed19b96ae0e96be912ef8
4
+ data.tar.gz: 6a35b34be56aa6b3d06dae11fc466b9411aa8ae9
5
5
  SHA512:
6
- metadata.gz: 8c22c60d9860e6367dfc1d4ca1779596520e8951d297c59f09bf4f8fb61c340808603b26b28e1bceddae817b00d2487e3eb276165aedcd16b243b59ff49da534
7
- data.tar.gz: 7ae8682cece826d4cb2df8d207eae3aac3a59d4808a55355938bbf28dec941830e5774ac923f7990c63fd12ad9899876336b527c6e31b0ea2fde5858d9b5f937
6
+ metadata.gz: e2910a3048a9ab65e993252e74e24e622b70fcd6c8b1e21432a7989fab05a6f7f3156414aabdfdd803c5c00a1021259a90c85ccc36ba37bceabd36f320cee6ff
7
+ data.tar.gz: 69b1e8955e98194d41882650fd30015dc6bd225ef259d3d547e4c14e19efc197ba2ff8e07ad476af92b9840b66d8615a63211aaecda5bcc0fc1b0aaaccd1191e
@@ -149,10 +149,10 @@ module DittoCode
149
149
 
150
150
  # Get the initializers and the ends of the blocks
151
151
  if @isView
152
- initializers = line.scan(/<%[\s]*(if|do|def)[\s]+/).size + line.scan(/<%[@=;\s\w\d]*(if|do|def)[\s]+/).size
152
+ initializers = line.scan(/<%[\s]*(case|unless|if|do|def)[\s]+/).size + line.scan(/<%[@=;\s\w\d]*(case|unless|if|do|def)[\s]+/).size
153
153
  finals = line.scan(/[\s]+(end)[\s]*%>/).size
154
154
  else
155
- initializers = line.scan(/^(if|do|def)[\s]+/).size + line.scan(/[\s]+(if|do|def)[\s]+/).size + line.scan(/[\s]+(if|do|def)$/).size
155
+ initializers = line.scan(/^(case|unless|if|do|def)[\s]+/).size + line.scan(/[\s]+(case|unless|if|do|def)[\s]+/).size + line.scan(/[\s]+(case|unless|if|do|def)$/).size
156
156
  finals = line.scan(/[\s]+(end)[\s]+/).size + line.scan(/^(end)[\s]+/).size + line.scan(/[\s]+(end)$/).size
157
157
  end
158
158
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ditto_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel M Miguel