faml 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d3d6e9933ba8aa9a3e12fbba30474f4f930c912
4
- data.tar.gz: de060fd62fd0dbbadcb2afce01af8118a44b1735
3
+ metadata.gz: 328702b10e441bb1ae9badaa46916346ae4ce107
4
+ data.tar.gz: bb21f995e912c1730b63248d03ec0c53950edb0c
5
5
  SHA512:
6
- metadata.gz: ec7e51f60ee73922dafa2dace0a192d502e6654ec96490b61c30e149d601e5d41583f4eebd689b52d6c1db488c5f370304619ff41022edeb7d9c65059b2d87aa
7
- data.tar.gz: 7862119f1f6240fb3cf137dcca00c0be7aade9dfe73ed1c4e00484b4095909b45fb6340e80bb010ed66a6e3772b8f956e382b025b0b1ba8a59d6b09772550bfd
6
+ metadata.gz: 61e63a2853364b69ffccdc59a1ceac429eba475a4a7cfa93c67a354a2cf74f75d66fa062a52b2a0f6dc7c0d09cf572663cf47772e5c8f91c9f584aebfee258ca
7
+ data.tar.gz: 47fffa94adedb8d3197076b5a1bf7ecef6a95a7e4a52606a710d7e08eb5f9959f9cb866df51d725a92001db941d2bdba5a6990fec056c76c8e9b46f3e6ea21b3
@@ -1,3 +1,7 @@
1
+ ## 0.2.4 (2015-03-26)
2
+ - Fix parser when parsing `>` or `<` after attribute lists
3
+ - `%div{foo: :bar} <br>` was incorrectly parsed as `%div{foo: :bar}< br>` .
4
+
1
5
  ## 0.2.3 (2015-03-25)
2
6
  - Always escape texts in :escape filter
3
7
  - It was not escaped when used in Rails
@@ -94,7 +94,7 @@ module Faml
94
94
  depth = ParserUtils.balance(s, '{', '}', depth)
95
95
  if depth == 0
96
96
  attr = s.pre_match + s.matched
97
- return [attr[1, attr.size-2], s.rest.lstrip]
97
+ return [attr[1, attr.size-2], s.rest]
98
98
  else
99
99
  if text[-1] == ',' && @line_parser.has_next?
100
100
  text << @line_parser.next_line
@@ -117,7 +117,7 @@ module Faml
117
117
  if depth == 0
118
118
  t = s.string.byteslice(pre_pos ... s.pos-1)
119
119
  new_attributes.concat(parse_new_attribute_list(t))
120
- return [new_attributes, s.rest.lstrip]
120
+ return [new_attributes, s.rest]
121
121
  else
122
122
  if @line_parser.has_next?
123
123
  text << ' ' << @line_parser.next_line
@@ -1,3 +1,3 @@
1
1
  module Faml
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -67,6 +67,11 @@ HAML
67
67
  = i
68
68
  HAML
69
69
  end
70
+
71
+ it 'parses texts correctly' do
72
+ expect(render_string('%div{foo: :bar} <b>hello</b>')).to eq("<div foo='bar'><b>hello</b></div>\n")
73
+ expect(render_string('%div(foo="bar") <b>hello</b>')).to eq("<div foo='bar'><b>hello</b></div>\n")
74
+ end
70
75
  end
71
76
 
72
77
  describe '><' 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.3
4
+ version: 0.2.4
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-03-25 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape_utils