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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hamlit/parser.rb +2 -2
- data/lib/hamlit/version.rb +1 -1
- data/spec/hamlit/engine/text_spec.rb +15 -0
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61d820a639e5851bb7168a6e43dda33233e2bfb5
|
4
|
+
data.tar.gz: 8f1cfdf0a73b5bf00448d83f2618bb35bc085242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b2efdc446a07a9c0845b6077875df95b54695fd2e849ba6e2930a8c5cad06161687bd3eb34ebe001f4e7fb1e6180400ac09218b749eba1448d1f3e59d38a35d
|
7
|
+
data.tar.gz: 2135080f8d2b8a0b3c40f1d0961b243e4bc50baec47966bf04a9e55f8fadbffef103a4b823df47919a492e0068425898493607b17e1c80c0877818f4c8855701
|
data/CHANGELOG.md
CHANGED
data/lib/hamlit/parser.rb
CHANGED
@@ -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 '&'
|
data/lib/hamlit/version.rb
CHANGED
@@ -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.
|
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:
|