sablon 0.0.19.beta2 → 0.0.19.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sablon/html/converter.rb +1 -0
- data/lib/sablon/html/visitor.rb +8 -0
- data/lib/sablon/version.rb +1 -1
- data/test/html/converter_test.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43e4aa5cc44824e41d65481d0b32a1f97a94ea2c
|
4
|
+
data.tar.gz: 9fb8f9890f54cd1169ade7b178a2f995bc12d37b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04ed4067045f1067cf36f98bc9139b869e66179a75f009d774e547df9a138b029ca2d47266e2e5019c70592b1e3821a921e01d93dfc22e74a377fc7f14647c9f
|
7
|
+
data.tar.gz: 40435b0860b374a75e07343793d55d66b6a880b9df3b0951206171cdc961146f79204c5e7fd0988655ad3867a46b26720bfc6874b7cc588ac7852c85ddeeae07
|
data/Gemfile.lock
CHANGED
data/lib/sablon/html/visitor.rb
CHANGED
data/lib/sablon/version.rb
CHANGED
data/test/html/converter_test.rb
CHANGED
@@ -275,6 +275,18 @@ class HTMLConverterASTTest < Sablon::TestCase
|
|
275
275
|
assert_equal ['Paragraph'], ast.map(&:style)
|
276
276
|
end
|
277
277
|
|
278
|
+
def test_ignore_last_br_in_div
|
279
|
+
input = '<div>Lorem ipsum dolor sit amet<br /></div>'
|
280
|
+
par = @converter.processed_ast(input).to_a.first
|
281
|
+
assert_equal [Sablon::HTMLConverter::Text], par.runs.nodes.map(&:class)
|
282
|
+
end
|
283
|
+
|
284
|
+
def test_ignore_br_in_blank_div
|
285
|
+
input = '<div><br /></div>'
|
286
|
+
par = @converter.processed_ast(input).to_a.first
|
287
|
+
assert_equal [], par.runs.nodes.map(&:class)
|
288
|
+
end
|
289
|
+
|
278
290
|
def test_ul
|
279
291
|
input = '<ul><li>Lorem</li><li>ipsum</li></ul>'
|
280
292
|
ast = @converter.processed_ast(input).to_a
|