hamlit 1.5.8 → 1.5.9

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: 3292ded147aeb720738b722d3ae053e58b50ba1d
4
- data.tar.gz: ccc5a8f8dd78f16325c7da108946125f927708df
3
+ metadata.gz: 61d820a639e5851bb7168a6e43dda33233e2bfb5
4
+ data.tar.gz: 8f1cfdf0a73b5bf00448d83f2618bb35bc085242
5
5
  SHA512:
6
- metadata.gz: e5e7fc75dd1d78f68283c6f2bc0f48107284320528ecd087e20dc3e2d2ec5c2c3942642818cb3e477b18c76f455a08bc12668b44a70ea36943df216af83c23aa
7
- data.tar.gz: 914adab630716407fc272b775f19af94e2245f3cba68881c9abe363ed2c7813ba3388917331c8a4b93dd825d3f5442364c46961871009455294e9ab05fea0d19
6
+ metadata.gz: 1b2efdc446a07a9c0845b6077875df95b54695fd2e849ba6e2930a8c5cad06161687bd3eb34ebe001f4e7fb1e6180400ac09218b749eba1448d1f3e59d38a35d
7
+ data.tar.gz: 2135080f8d2b8a0b3c40f1d0961b243e4bc50baec47966bf04a9e55f8fadbffef103a4b823df47919a492e0068425898493607b17e1c80c0877818f4c8855701
@@ -1,3 +1,7 @@
1
+ ## v1.5.9
2
+
3
+ - Reject silent script after a tag
4
+
1
5
  ## v1.5.8
2
6
 
3
7
  - Fix parsing inline script for != and &=
@@ -92,6 +92,8 @@ module Hamlit
92
92
  parse_text(scanner, scan: /\\/)
93
93
  when '/'
94
94
  parse_comment(scanner)
95
+ when '-'
96
+ parse_silent_script(scanner)
95
97
  when ':'
96
98
  parse_filter(scanner)
97
99
  end
@@ -108,8 +110,6 @@ module Hamlit
108
110
  case scanner.peek(1)
109
111
  when '=', '~'
110
112
  parse_script(scanner)
111
- when '-'
112
- parse_silent_script(scanner)
113
113
  when '!'
114
114
  parse_text(scanner, lstrip: true, escape: false, scan: /!/)
115
115
  when '&'
@@ -1,3 +1,3 @@
1
1
  module Hamlit
2
- VERSION = "1.5.8"
2
+ VERSION = "1.5.9"
3
3
  end
@@ -71,6 +71,21 @@ describe Hamlit::Engine do
71
71
  expect(render_string('\ a')).to eq(" a\n")
72
72
  end
73
73
 
74
+ it 'renders spaced - properly' do
75
+ assert_render(<<-HAML, <<-'HTML')
76
+ %div
77
+ foo
78
+ .test - bar
79
+ .test - baz
80
+ HAML
81
+ <div>
82
+ foo
83
+ <div class='test'>- bar</div>
84
+ <div class='test'>- baz</div>
85
+ </div>
86
+ HTML
87
+ end
88
+
74
89
  describe 'inline operator' do
75
90
  it 'renders ! operator' do
76
91
  assert_render(<<-'HAML', <<-'HTML')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.8
4
+ version: 1.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
@@ -573,4 +573,3 @@ test_files:
573
573
  - spec/rails/vendor/assets/javascripts/.keep
574
574
  - spec/rails/vendor/assets/stylesheets/.keep
575
575
  - spec/spec_helper.rb
576
- has_rdoc: