Band-aid fix for bulleted list rendering (#1803)

This commit is contained in:
Kevin Xiwei Zheng
2013-07-01 20:47:00 -04:00
parent fd028d419e
commit 817880012c
2 changed files with 12 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ class DTextTest < ActiveSupport::TestCase
def test_auto_urls_in_parentheses
assert_equal('<p>a (<a href="http://test.com">http://test.com</a>) b</p>', p('a (http://test.com) b'))
end
def test_old_syle_links
assert_equal('<p><a href="http://test.com">test</a></p>', p('"test":http://test.com'))
end
@@ -125,6 +125,10 @@ class DTextTest < ActiveSupport::TestCase
assert_equal('<ul><li><a href="/posts/1">post #1</a></li></ul>', p("* post #1").gsub(/\n/, ""))
end
def test_lists_not_preceded_by_newline
assert_equal('<p>a</p><ul><li>b</li><li>c</li></ul>', p("a\n* b\n* c").gsub(/\n/, ""))
end
def test_inline_tags
assert_equal('<p><a href="/posts?tags=tag">tag</a></p>', p("{{tag}}"))
end