Permalink
Browse files

Fix intra emphasis issues

  • Loading branch information...
1 parent 72c5504 commit ef0926b0f13c0cd4d5556cc94b74007d7b8a50d6 @vmg committed Oct 11, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −1 sundown
  2. +8 −0 test/redcarpet_test.rb
Submodule sundown updated 1 files
+6 −1 src/markdown.c
View
@@ -336,6 +336,14 @@ def test_spaced_headers
rd = render_with({:space_after_headers => true}, "#123 a header yes\n")
assert rd !~ /<h1>/
end
+
+ def test_proper_intra_emphasis
+ md = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :no_intra_emphasis => true)
+ assert render_with({:no_intra_emphasis => true}, "http://en.wikipedia.org/wiki/Dave_Allen_(comedian)") !~ /<em>/
+ assert render_with({:no_intra_emphasis => true}, "this fails: hello_world_") !~ /<em>/
+ assert render_with({:no_intra_emphasis => true}, "this also fails: hello_world_#bye") !~ /<em>/
+ assert render_with({:no_intra_emphasis => true}, "this works: hello_my_world") !~ /<em>/
+ end
end
class CustomRenderTest < Test::Unit::TestCase

0 comments on commit ef0926b

Please sign in to comment.