faml 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/faml/element_parser.rb +1 -1
- data/lib/faml/parser.rb +0 -3
- data/lib/faml/version.rb +1 -1
- data/spec/render/multiline_spec.rb +7 -0
- data/spec/render/silent_script_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00278629939c45cb0b99bb33b4804a1632fe9e2b
|
4
|
+
data.tar.gz: 8c70078e0c7da99320775bd7b1e9fbadae654aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d4a3d25800c968bd0499386817e64293bd8bc99cfe2df3d8bc05d827c2fee83e663f9d7b793429a3f0ded1f8d2b662e656ed89dc76ae801c0084394506f3bb1
|
7
|
+
data.tar.gz: aacf989f3c254913503803e8596cb05c90fcc839f43344bcca6a3379132a06ccfac92a62db9738dd7886cbc54928d12c2e5703c5a298c3cbd0b244a7b08009fe
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.2.8 (2015-04-02)
|
2
|
+
- Allow empty silent script body
|
3
|
+
- For compatibility with haml
|
4
|
+
- https://github.com/eagletmt/faml/issues/16
|
5
|
+
- Fix parse error at multiline in attribute list
|
6
|
+
- https://github.com/eagletmt/faml/issues/15
|
7
|
+
|
1
8
|
## 0.2.7 (2015-03-31)
|
2
9
|
- Improve backtrace of compile time errors
|
3
10
|
- Annotate Faml::Ast with filename and line number (internal)
|
data/lib/faml/element_parser.rb
CHANGED
@@ -98,7 +98,7 @@ module Faml
|
|
98
98
|
attr = s.pre_match + s.matched
|
99
99
|
return [attr[1, attr.size-2], s.rest]
|
100
100
|
else
|
101
|
-
if
|
101
|
+
if /,\s*\z/ === text && @line_parser.has_next?
|
102
102
|
text << @line_parser.next_line
|
103
103
|
else
|
104
104
|
syntax_error!('Unmatched brace')
|
data/lib/faml/parser.rb
CHANGED
@@ -146,9 +146,6 @@ module Faml
|
|
146
146
|
end
|
147
147
|
node = create_node(Ast::SilentScript)
|
148
148
|
node.script = text[/\A- *(.*)\z/, 1]
|
149
|
-
if node.script.empty?
|
150
|
-
syntax_error!("No Ruby code to evaluate")
|
151
|
-
end
|
152
149
|
node.script += RubyMultiline.read(@line_parser, node.script)
|
153
150
|
@ast << node
|
154
151
|
end
|
data/lib/faml/version.rb
CHANGED
@@ -80,8 +80,8 @@ HAML
|
|
80
80
|
HAML
|
81
81
|
end
|
82
82
|
|
83
|
-
it '
|
84
|
-
expect
|
83
|
+
it 'allows empty silent script body' do
|
84
|
+
expect(render_string("%br\n-\n%br")).to eq("<br>\n<br>\n")
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'checks indent levels' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
version: '0'
|
433
433
|
requirements: []
|
434
434
|
rubyforge_project:
|
435
|
-
rubygems_version: 2.
|
435
|
+
rubygems_version: 2.2.2
|
436
436
|
signing_key:
|
437
437
|
specification_version: 4
|
438
438
|
summary: Faster implementation of Haml template language.
|