Skip to content

Commit

Permalink
Fix intra emphasis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed Oct 11, 2012
1 parent 72c5504 commit ef0926b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sundown
Submodule sundown updated 1 files
+6 −1 src/markdown.c
8 changes: 8 additions & 0 deletions test/redcarpet_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit ef0926b

Please sign in to comment.