hamlit 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/hamlit/parser.rb +2 -3
- data/lib/hamlit/version.rb +1 -1
- data/spec/hamlit/engine/text_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fcdd736eed726e665a108fc41bad6d5525bedca
|
4
|
+
data.tar.gz: a6bd7ab15f0a06995eef5704105ea272288314e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2727bfa9938f2aa332f160bcf716b91f70a14b6a4f1562bc21a0a94f5ff23285aa9f033928149f6ffdfe91a1570073569d5d92422ab28830a2f0eafdf688a3c
|
7
|
+
data.tar.gz: f50b2affcf6a6a0b6150f7f6ac729aaeed8c8821126a5e654cf1f8220b7c7ec5e1989ee51e3da202feeb3415048645cd42d79257ac592014f086d7bbe5282836
|
data/CHANGELOG.md
CHANGED
data/lib/hamlit/parser.rb
CHANGED
@@ -71,9 +71,8 @@ module Hamlit
|
|
71
71
|
return [:multi] if empty_line?(line)
|
72
72
|
|
73
73
|
scanner = wrap_scanner(line)
|
74
|
-
scanner.scan(/[ \t]+/)
|
75
|
-
|
76
74
|
unless inline
|
75
|
+
scanner.scan(/[ \t]+/)
|
77
76
|
ast = parse_outer_line(scanner)
|
78
77
|
return ast if ast
|
79
78
|
end
|
@@ -118,7 +117,7 @@ module Hamlit
|
|
118
117
|
when '=', '~'
|
119
118
|
parse_script(scanner)
|
120
119
|
else
|
121
|
-
parse_text(scanner)
|
120
|
+
parse_text(scanner, lstrip: true)
|
122
121
|
end
|
123
122
|
end
|
124
123
|
|
data/lib/hamlit/version.rb
CHANGED
@@ -129,6 +129,24 @@ describe Hamlit::Engine do
|
|
129
129
|
HTML
|
130
130
|
end
|
131
131
|
|
132
|
+
it 'renders &, ! operator inside a tag' do
|
133
|
+
assert_render(<<-HAML, <<-HTML)
|
134
|
+
%span
|
135
|
+
%span
|
136
|
+
%span& nbsp;
|
137
|
+
%span !hello
|
138
|
+
%span!hello
|
139
|
+
%span! hello
|
140
|
+
HAML
|
141
|
+
<span> </span>
|
142
|
+
<span>nbsp;</span>
|
143
|
+
<span>nbsp;</span>
|
144
|
+
<span>!hello</span>
|
145
|
+
<span>hello</span>
|
146
|
+
<span>hello</span>
|
147
|
+
HTML
|
148
|
+
end
|
149
|
+
|
132
150
|
it 'does not accept backslash operator' do
|
133
151
|
assert_render(<<-'HAML', <<-'HTML')
|
134
152
|
%span\ foo
|
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.6.
|
4
|
+
version: 1.6.3
|
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-
|
11
|
+
date: 2015-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|