hamlit 1.5.6 → 1.5.7

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: 77be0fc87affead60a2cc9cf21fd59b2983cc06c
4
- data.tar.gz: 88ee1131ab3ab0e9d48ab26389342dd878c41952
3
+ metadata.gz: bd08607e661773fdb5b3615f58c436b3efceea82
4
+ data.tar.gz: 935a17fc15a78de1d6ca821104fa8d3f74f1b54c
5
5
  SHA512:
6
- metadata.gz: 59c87b3d65976a804e11a4cd297321a528c4bd65c33a49258bd25f4669a49bffb72a251c3b50e908f46b5c7ddc7fbb6297da3825f3f2c8bb604b1883f908c250
7
- data.tar.gz: 429b1fb44e55ee9f1732d0c4af1e8a7bd8b96e69cd04dc8a16d2cbb8ad0c43a46a8ff3e301bff9d9c8365a5fce83ff9a45bfff51638652253d010aff5468f314
6
+ metadata.gz: ca7571512c56d3ff44304efd1c30135344aed980dfb26395d23006068f76c35ae29ae19bc4533ec3644712a39bd03ad5b088735f325f9a01745f3808e40152e2
7
+ data.tar.gz: 26145af5ca66444899ac3498c460e1695a6ee280f802fc794664edac648f5bc8afd242d16ca3e40c95bb56d76128b351e23dc43d7a4c5c3bde805108aee5157c
@@ -1,3 +1,7 @@
1
+ ## v1.5.7
2
+
3
+ - Fix the behavior for multi-line script
4
+
1
5
  ## v1.5.6
2
6
 
3
7
  - Raise error for unbalanced brackets
@@ -25,7 +25,9 @@ module Hamlit
25
25
  ast = [:html, :tag, tag, attrs]
26
26
  inner_removal = parse_whitespace_removal(scanner)
27
27
 
28
- unless has_block?
28
+ if scanner.match?(/=/)
29
+ return ast << parse_script(scanner)
30
+ elsif !has_block?
29
31
  return ast if scanner.scan(/\//)
30
32
  return ast << parse_line(scanner, inline: true)
31
33
  end
@@ -1,3 +1,3 @@
1
1
  module Hamlit
2
- VERSION = "1.5.6"
2
+ VERSION = "1.5.7"
3
3
  end
@@ -8,6 +8,15 @@ describe Hamlit::Engine do
8
8
  HTML
9
9
  end
10
10
 
11
+ it 'accepts multi-line =' do
12
+ assert_render(<<-HAML, <<-HTML)
13
+ %span= 'hello'.gsub('hell',
14
+ '')
15
+ HAML
16
+ <span>o</span>
17
+ HTML
18
+ end
19
+
11
20
  it 'renders multi-line tag' do
12
21
  assert_render(<<-HAML, <<-HTML)
13
22
  %span
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-07 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape_utils