test/devcenter-parser_test.rb in devcenter-parser-2.2.10 vs test/devcenter-parser_test.rb in devcenter-parser-2.2.11

- old
+ new

@@ -16,18 +16,26 @@ it 'maintains toolbelt custom element' do assert_parsing_unsanitized_result '<toolbelt />', '<p><toolbelt></toolbelt></p>' end + it 'keeps html entities' do + assert_parsing_unsanitized_result '<p>&nbsp;</p>', '<p>&nbsp;</p>' + end + end describe '.to_html' do it 'returns empty string for nil input' do assert_parsing_result nil, '' end + it 'keeps html entities' do + assert_parsing_result '<p>&nbsp;</p>', '<p>&nbsp;</p>' + end + it 'does not create <em>s inside words' do assert_parsing_result 'foo_bar_baz', '<p>foo_bar_baz</p>' end it 'removes iframes with script tags in the src' do @@ -300,27 +308,24 @@ | 1 | 2 | | 3 | 4 | MARKDOWN html = <<-HTML -<table> -<thead> +<table><thead> <tr> <th>A</th> <th>B</th> </tr> -</thead> -<tbody> +</thead><tbody> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>3</td> <td>4</td> </tr> -</tbody> -</table> +</tbody></table> HTML assert_parsing_result md, html end