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.
- checksums.yaml +4 -4
- data/lib/dittocode/parse.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af74379b473320c2e99ed19b96ae0e96be912ef8
|
4
|
+
data.tar.gz: 6a35b34be56aa6b3d06dae11fc466b9411aa8ae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2910a3048a9ab65e993252e74e24e622b70fcd6c8b1e21432a7989fab05a6f7f3156414aabdfdd803c5c00a1021259a90c85ccc36ba37bceabd36f320cee6ff
|
7
|
+
data.tar.gz: 69b1e8955e98194d41882650fd30015dc6bd225ef259d3d547e4c14e19efc197ba2ff8e07ad476af92b9840b66d8615a63211aaecda5bcc0fc1b0aaaccd1191e
|
data/lib/dittocode/parse.rb
CHANGED
@@ -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
|
|