test/devcenter-parser_test.rb in devcenter-parser-1.3.1 vs test/devcenter-parser_test.rb in devcenter-parser-1.3.2

- old
+ new

@@ -54,10 +54,30 @@ assert DevcenterParser.to_html(md, :maruku).include?("<h2 id=\"foo-bar\">#{title}</h2>"), "Maruku: " + DevcenterParser.to_html(md, :maruku) end end describe 'github markdown' do + + it 'generates apostrophes from single quotes in plain text' do + md = "That's it" + html = "<p>That’s it</p>" + assert_github_result(md, html) + end + + it 'generates apostrophes from single quotes in callout|warning|note blocks' do + md = <<-MARKDOWN +> warning +> That's it +MARKDOWN + html = <<-HTML +<div class="warning"> +<p>That’s it</p> +</div> +HTML + assert_github_result(md, html) + end + it 'github markdown supports regular block quotes without callout|warning|note' do md = <<-MARKDOWN Testing > not a callout @@ -74,11 +94,11 @@ <p>not a callout <strong>strong</strong> normal</p> </blockquote> -<p>And that's it.</p> +<p>And that’s it.</p> HTML assert_github_result(md, html) md = <<-MARKDOWN @@ -98,11 +118,11 @@ <p>calloutnonono <strong>strong</strong> normal</p> </blockquote> -<p>And that's it.</p> +<p>And that’s it.</p> HTML assert_github_result(md, html) end @@ -134,11 +154,11 @@ <div class="callout"> <p><strong>strong</strong> normal</p> </div> -<p>And that's it.</p> +<p>And that’s it.</p> HTML mds.each do |md| assert_github_result(md, html) end @@ -175,10 +195,10 @@ <p><strong>strong</strong></p> <p>normal</p> </div> -<p>And that's it.</p> +<p>And that’s it.</p> HTML mds.each do |md| assert_github_result(md, html) end \ No newline at end of file