slimi 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/slimi/parser.rb +15 -1
- data/lib/slimi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6989d1c4e4e23b38c72bb2d4e45c93670a483af75341a7a4335272440705de63
|
|
4
|
+
data.tar.gz: 1a70a7daeb5fe5feb811dfba0a9f66b1a4949964ead59bd7b4a3a6a67c02eee5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52f7902ed8840052c40a072d88c5949f66e017e0d1faca562baef7fb5dd8dcd88fe0d9d2585085f053e1c66acf37f046a12ec2a41600b0e52ad13999d62995cc
|
|
7
|
+
data.tar.gz: 7c11eb7a7fc1e8ebba1fd811726cf7658f95076523ef755ddf2d7078cb7dddafa7dafd29c583c135b18401252e18a3799f9922a2a2be94efc03b0a749cc65c8b
|
data/Gemfile.lock
CHANGED
data/lib/slimi/parser.rb
CHANGED
|
@@ -139,7 +139,9 @@ module Slimi
|
|
|
139
139
|
@stacks.last << tag
|
|
140
140
|
@stacks.last << [:static, ' '] if with_trailing_white_space
|
|
141
141
|
|
|
142
|
-
if @scanner.skip(/[ \t]
|
|
142
|
+
if @scanner.skip(/[ \t]*:[ \t]*/)
|
|
143
|
+
parse_block_expansion(tag)
|
|
144
|
+
elsif @scanner.skip(/[ \t]*(?=\R|$)/)
|
|
143
145
|
content = [:multi]
|
|
144
146
|
tag << content
|
|
145
147
|
@stacks << content
|
|
@@ -166,6 +168,18 @@ module Slimi
|
|
|
166
168
|
end
|
|
167
169
|
end
|
|
168
170
|
|
|
171
|
+
# Parse the tag after a colon as the only child of the tag before it.
|
|
172
|
+
# e.g. li: a href="/" Home
|
|
173
|
+
# @param [Array] tag
|
|
174
|
+
def parse_block_expansion(tag)
|
|
175
|
+
content = [:multi]
|
|
176
|
+
tag << content
|
|
177
|
+
index = @stacks.size
|
|
178
|
+
@stacks << content
|
|
179
|
+
parse_tag_inner || syntax_error!(Errors::UnknownLineIndicatorError)
|
|
180
|
+
@stacks.delete_at(index)
|
|
181
|
+
end
|
|
182
|
+
|
|
169
183
|
# Parse tag name part.
|
|
170
184
|
# e.g. div.foo
|
|
171
185
|
# ^^^
|
data/lib/slimi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slimi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
117
|
version: '0'
|
|
118
118
|
requirements: []
|
|
119
|
-
rubygems_version:
|
|
119
|
+
rubygems_version: 4.0.20
|
|
120
120
|
specification_version: 4
|
|
121
121
|
summary: Yet another implementation for Slim template language.
|
|
122
122
|
test_files: []
|