Mixed mode that doesn't break on images

This commit is contained in:
Alexey Verkhovsky 2005-05-01 02:47:57 +00:00
parent bb1425c6f7
commit 598e4f272d
2 changed files with 10 additions and 2 deletions

View file

@ -43,8 +43,10 @@ module Engines
class Mixed < AbstractEngine
def mask
RedCloth.new(@content, @content.options[:engine_opts]).to_html(
:textile, :markdown)
redcloth = RedCloth.new(@content, @content.options[:engine_opts])
redcloth.filter_html = false
redcloth.no_span_caps = false
redcloth.to_html
end
end

View file

@ -302,6 +302,12 @@ class RevisionTest < Test::Unit::TestCase
list_with_tildas)
end
def test_textile_image_in_mixed_wiki
@web.markup = :mixed
assert_markup_parsed_as(
"<p><img src=\"http://google.com\" alt=\"\" />\nss</p>",
"!http://google.com!\r\nss")
end
def assert_markup_parsed_as(expected_output, input)